diff --git a/lib/core-net/adopt.c b/lib/core-net/adopt.c index 23b97527d..216b37027 100644 --- a/lib/core-net/adopt.c +++ b/lib/core-net/adopt.c @@ -236,11 +236,9 @@ lws_adopt_descriptor_vhost2(struct lws *new_wsi, lws_adoption_type type, if (new_wsi->role_ops->adoption_cb[lwsi_role_server(new_wsi)]) n = new_wsi->role_ops->adoption_cb[lwsi_role_server(new_wsi)]; -#if !defined(LWS_AMAZON_RTOS) - if (new_wsi->context->event_loop_ops->accept) - if (new_wsi->context->event_loop_ops->accept(new_wsi)) + if (new_wsi->context->event_loop_ops->sock_accept) + if (new_wsi->context->event_loop_ops->sock_accept(new_wsi)) goto fail; -#endif #if LWS_MAX_SMP > 1 /* diff --git a/lib/core-net/vhost.c b/lib/core-net/vhost.c index 685a1640a..ede8e0e2c 100644 --- a/lib/core-net/vhost.c +++ b/lib/core-net/vhost.c @@ -914,11 +914,9 @@ lws_create_event_pipes(struct lws_context *context) wsi->desc.sockfd = context->pt[n].dummy_pipe_fds[0]; lwsl_debug("event pipe fd %d\n", wsi->desc.sockfd); -#if !defined(LWS_AMAZON_RTOS) - if (context->event_loop_ops->accept) - if (context->event_loop_ops->accept(wsi)) + if (context->event_loop_ops->sock_accept) + if (context->event_loop_ops->sock_accept(wsi)) return 1; -#endif if (__insert_wsi_socket_into_fds(context, wsi)) return 1; diff --git a/lib/event-libs/private-lib-event-libs.h b/lib/event-libs/private-lib-event-libs.h index d756699fa..119e84ea2 100644 --- a/lib/event-libs/private-lib-event-libs.h +++ b/lib/event-libs/private-lib-event-libs.h @@ -44,7 +44,7 @@ struct lws_event_loop_ops { /* close handle manually */ void (*close_handle_manually)(struct lws *wsi); /* event loop accept processing */ - int (*accept)(struct lws *wsi); + int (*sock_accept)(struct lws *wsi); /* control wsi active events */ void (*io)(struct lws *wsi, int flags); /* run the event loop for a pt */ diff --git a/lib/roles/cgi/cgi-server.c b/lib/roles/cgi/cgi-server.c index 075cf1f4a..ccfe2d487 100644 --- a/lib/roles/cgi/cgi-server.c +++ b/lib/roles/cgi/cgi-server.c @@ -178,8 +178,8 @@ lws_cgi(struct lws *wsi, const char * const *exec_array, } for (n = 0; n < 3; n++) { - if (wsi->context->event_loop_ops->accept) - if (wsi->context->event_loop_ops->accept(cgi->stdwsi[n])) + if (wsi->context->event_loop_ops->sock_accept) + if (wsi->context->event_loop_ops->sock_accept(cgi->stdwsi[n])) goto bail3; if (__insert_wsi_socket_into_fds(wsi->context, cgi->stdwsi[n])) diff --git a/lib/roles/http/client/client-handshake.c b/lib/roles/http/client/client-handshake.c index fb38ee81c..3ccbfa198 100644 --- a/lib/roles/http/client/client-handshake.c +++ b/lib/roles/http/client/client-handshake.c @@ -539,11 +539,9 @@ ads_known: lwsl_debug("%s: %p: WAITING_CONNECT\n", __func__, wsi); lwsi_set_state(wsi, LRS_WAITING_CONNECT); -#if !defined(LWS_AMAZON_RTOS) - if (wsi->context->event_loop_ops->accept) - if (wsi->context->event_loop_ops->accept(wsi)) + if (wsi->context->event_loop_ops->sock_accept) + if (wsi->context->event_loop_ops->sock_accept(wsi)) goto try_next_result_closesock; -#endif if (__insert_wsi_socket_into_fds(wsi->context, wsi)) goto try_next_result_closesock;