1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

event-ops: rename accept member to sock_accept

Some toolchains have lwip accept() as a preprocessor define...
This commit is contained in:
Andy Green 2020-01-15 12:20:50 +00:00
parent 72a5993deb
commit b0b8a684ed
5 changed files with 9 additions and 15 deletions

View file

@ -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
/*

View file

@ -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;

View file

@ -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 */

View file

@ -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]))

View file

@ -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;