From 0c2f4d865ab15292a1cfb2234bffc64aeca58ac6 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 19 Feb 2013 19:19:51 +0800 Subject: [PATCH] update missed extpoll calls to use correct args for ssl http://libwebsockets.org/trac/ticket/15#comment:16 Reported-by: Joakim Soderberg Signed-off-by: Andy Green --- lib/client.c | 2 +- lib/server.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/client.c b/lib/client.c index 576c7ff..e3d3da3 100644 --- a/lib/client.c +++ b/lib/client.c @@ -101,7 +101,7 @@ int lws_client_socket_service(struct libwebsocket_context *context, /* external POLL support via protocol 0 */ context->protocols[0].callback(context, wsi, LWS_CALLBACK_CLEAR_MODE_POLL_FD, - (void *)(long)wsi->sock, NULL, POLLOUT); + wsi->user_space, (void *)(long)wsi->sock, POLLOUT); /* we can retry this... just cook the SSL BIO the first time */ diff --git a/lib/server.c b/lib/server.c index edbcc97..44e6222 100644 --- a/lib/server.c +++ b/lib/server.c @@ -328,7 +328,7 @@ int lws_server_socket_service(struct libwebsocket_context *context, /* external POLL support via protocol 0 */ context->protocols[0].callback(context, wsi, LWS_CALLBACK_CLEAR_MODE_POLL_FD, - (void *)(long)wsi->sock, NULL, POLLOUT); + wsi->user_space, (void *)(long)wsi->sock, POLLOUT); lws_latency_pre(context, wsi); n = SSL_accept(wsi->ssl); @@ -347,7 +347,8 @@ int lws_server_socket_service(struct libwebsocket_context *context, /* external POLL support via protocol 0 */ context->protocols[0].callback(context, wsi, LWS_CALLBACK_SET_MODE_POLL_FD, - (void *)(long)wsi->sock, NULL, POLLIN); + wsi->user_space, + (void *)(long)wsi->sock, POLLIN); lwsl_info("SSL_ERROR_WANT_READ\n"); break; } @@ -358,7 +359,8 @@ int lws_server_socket_service(struct libwebsocket_context *context, /* external POLL support via protocol 0 */ context->protocols[0].callback(context, wsi, LWS_CALLBACK_SET_MODE_POLL_FD, - (void *)(long)wsi->sock, NULL, POLLOUT); + wsi->user_space, + (void *)(long)wsi->sock, POLLOUT); break; } lwsl_debug("SSL_accept failed skt %u: %s\n", -- 2.7.4