mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
options: fixes
sai: add default-noudp and windows plats for noserver
This commit is contained in:
parent
6f6147d7a5
commit
d73c4baab2
7 changed files with 24 additions and 5 deletions
11
.sai.json
11
.sai.json
|
@ -102,6 +102,10 @@
|
|||
"cmake": "",
|
||||
"platforms": "w10/x86_64-amd/msvc, w10/x86_64-amd/noptmsvc, freertos-linkit/arm32-m4-mt7697-usi/gcc, linux-ubuntu-2004/aarch64-a72-bcm2711-rpi4/gcc, w10/x86_64-amd/mingw32, w10/x86_64-amd/mingw64, netbsd/aarch64BE-bcm2837-a53/gcc, w10/x86_64-amd/wmbedtls-msvc"
|
||||
},
|
||||
"default-noudp": {
|
||||
"cmake": "-DLWS_WITH_UDP=0",
|
||||
"platforms": "w10/x86_64-amd/msvc, w10/x86_64-amd/noptmsvc, freertos-linkit/arm32-m4-mt7697-usi/gcc, linux-ubuntu-2004/aarch64-a72-bcm2711-rpi4/gcc, w10/x86_64-amd/mingw32, w10/x86_64-amd/mingw64, netbsd/aarch64BE-bcm2837-a53/gcc, w10/x86_64-amd/wmbedtls-msvc"
|
||||
},
|
||||
"esp32-heltec": {
|
||||
"cmake": "",
|
||||
"cpack": "esp-heltec-wb32",
|
||||
|
@ -184,7 +188,8 @@
|
|||
"platforms": "not linux-centos-7/x86_64-amd/gcc, not linux-centos-8/x86_64-amd/gcc"
|
||||
},
|
||||
"noserver": {
|
||||
"cmake": "-DLWS_WITHOUT_SERVER=ON -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_SECURE_STREAMS=1"
|
||||
"cmake": "-DLWS_WITHOUT_SERVER=ON -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_SECURE_STREAMS=1",
|
||||
"platforms": "w10/x86_64-amd/msvc, w10/x86_64-amd/noptmsvc"
|
||||
},
|
||||
"noclient": {
|
||||
"cmake": "-DLWS_WITHOUT_CLIENT=ON -DLWS_WITH_MINIMAL_EXAMPLES=1"
|
||||
|
@ -208,6 +213,10 @@
|
|||
"cmake": "-DLWS_WITH_SDEVENT=ON",
|
||||
"platforms": "none, linux-fedora-32/x86_64-amd/gcc"
|
||||
},
|
||||
"uncommon_headers": {
|
||||
"cmake": "-DLWS_WITH_HTTP_BASIC_AUTH=0 -DLWS_WITH_HTTP_UNCOMMON_HEADERS=0 -DLWS_HTTP_HEADERS_ALL=0",
|
||||
"platforms": "none, linux-fedora-32/x86_64-amd/gcc"
|
||||
},
|
||||
"ipv6": {
|
||||
"cmake": "-DLWS_IPV6=ON",
|
||||
"platforms": "w10/x86_64-amd/mingw64, w10/x86_64-amd/msvc"
|
||||
|
|
|
@ -106,7 +106,8 @@ lws_get_addresses(struct lws_vhost *vh, void *ads, char *name,
|
|||
if (addr4.sin_family == AF_UNSPEC)
|
||||
return -1;
|
||||
|
||||
if (lws_plat_inet_ntop(AF_INET, &addr4.sin_addr, rip, (unsigned int)rip_len) == NULL)
|
||||
if (lws_plat_inet_ntop(AF_INET, &addr4.sin_addr, rip,
|
||||
(socklen_t)rip_len) == NULL)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
@ -291,7 +292,7 @@ lws_socket_bind(struct lws_vhost *vhost, lws_sockfd_type sockfd, int port,
|
|||
if (sockfd == LWS_SOCK_INVALID)
|
||||
return LWS_ITOSA_USABLE;
|
||||
|
||||
n = bind(sockfd, v, (unsigned int)n);
|
||||
n = bind(sockfd, v, (socklen_t)n);
|
||||
#ifdef LWS_WITH_UNIX_SOCK
|
||||
if (n < 0 && LWS_UNIX_SOCK_ENABLED(vhost)) {
|
||||
lwsl_err("ERROR on binding fd %d to \"%s\" (%d %d)\n",
|
||||
|
|
|
@ -181,10 +181,12 @@ lws_plat_insert_socket_into_fds(struct lws_context *context, struct lws *wsi)
|
|||
{
|
||||
struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
|
||||
|
||||
#if defined(LWS_WITH_UDP)
|
||||
if (wsi->udp) {
|
||||
lwsl_info("%s: UDP\n", __func__);
|
||||
pt->fds[pt->fds_count].events |= LWS_POLLIN;
|
||||
}
|
||||
#endif
|
||||
|
||||
pt->fds[pt->fds_count++].revents = 0;
|
||||
|
||||
|
|
|
@ -1322,7 +1322,7 @@ static const lws_rops_t rops_table_h2[] = {
|
|||
#if defined(LWS_WITH_SERVER)
|
||||
/* 1 */ { .check_upgrades = rops_check_upgrades_h2 },
|
||||
#else
|
||||
/* 1 */ { },
|
||||
/* 1 */ { .check_upgrades = NULL },
|
||||
#endif
|
||||
/* 2 */ { .pt_init_destroy = rops_pt_init_destroy_h2 },
|
||||
/* 3 */ { .init_vhost = rops_init_vhost_h2 },
|
||||
|
|
|
@ -801,9 +801,11 @@ lws_find_mount(struct lws *wsi, const char *uri_ptr, int uri_len)
|
|||
((hm->origin_protocol == LWSMPRO_CGI ||
|
||||
lws_hdr_total_length(wsi, WSI_TOKEN_GET_URI) ||
|
||||
lws_hdr_total_length(wsi, WSI_TOKEN_POST_URI) ||
|
||||
#if defined(LWS_WITH_HTTP_UNCOMMON_HEADERS)
|
||||
lws_hdr_total_length(wsi, WSI_TOKEN_PUT_URI) ||
|
||||
lws_hdr_total_length(wsi, WSI_TOKEN_PATCH_URI) ||
|
||||
lws_hdr_total_length(wsi, WSI_TOKEN_DELETE_URI) ||
|
||||
#endif
|
||||
lws_hdr_total_length(wsi, WSI_TOKEN_HEAD_URI) ||
|
||||
#if defined(LWS_ROLE_H2)
|
||||
(wsi->mux_substream &&
|
||||
|
|
|
@ -301,7 +301,7 @@ static const lws_rops_t rops_table_raw_skt[] = {
|
|||
#if defined(LWS_WITH_SERVER)
|
||||
/* 2 */ { .adoption_bind = rops_adoption_bind_raw_skt },
|
||||
#else
|
||||
/* 2 */ { },
|
||||
/* 2 */ { .adoption_bind = NULL },
|
||||
#endif
|
||||
#if defined(LWS_WITH_CLIENT)
|
||||
/* 3 */ { .client_bind = rops_client_bind_raw_skt },
|
||||
|
|
|
@ -151,8 +151,11 @@ static const uint32_t ss_state_txn_validity[] = {
|
|||
[LWSSSCS_QOS_NACK_LOCAL] = (1 << LWSSSCS_DESTROYING) |
|
||||
(1 << LWSSSCS_TIMEOUT),
|
||||
|
||||
/* he can get the timeout at any point and take no action... */
|
||||
[LWSSSCS_TIMEOUT] = (1 << LWSSSCS_CONNECTING) |
|
||||
(1 << LWSSSCS_CONNECTED) |
|
||||
(1 << LWSSSCS_QOS_ACK_REMOTE) |
|
||||
(1 << LWSSSCS_QOS_NACK_REMOTE) |
|
||||
(1 << LWSSSCS_POLL) |
|
||||
(1 << LWSSSCS_TIMEOUT) |
|
||||
(1 << LWSSSCS_DISCONNECTED) |
|
||||
|
@ -970,7 +973,9 @@ lws_ss_create(struct lws_context *context, int tsi, const lws_ss_info_t *ssi,
|
|||
lwsl_info("%s: CREATING returned status %d\n", __func__, (int)r);
|
||||
if (r == LWSSSSRET_DESTROY_ME) {
|
||||
|
||||
#if defined(LWS_WITH_SERVER) || defined(LWS_WITH_SYS_SMD)
|
||||
late_bail:
|
||||
#endif
|
||||
lws_pt_lock(pt, __func__);
|
||||
lws_dll2_remove(&h->list);
|
||||
lws_pt_unlock(pt);
|
||||
|
|
Loading…
Add table
Reference in a new issue