update missed extpoll calls to use correct args for ssl 30/3130/1
authorAndy Green <andy.green@linaro.org>
Tue, 19 Feb 2013 11:19:51 +0000 (19:19 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:37 +0000 (13:01 -0800)
http://libwebsockets.org/trac/ticket/15#comment:16

Reported-by: Joakim Soderberg <joakim.soderberg@gmail.com>
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/client.c
lib/server.c

index 576c7ff..e3d3da3 100644 (file)
@@ -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 */
 
index edbcc97..44e6222 100644 (file)
@@ -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",