updated spec enabled ssl
[profile/ivi/libwebsockets.git] / lib / client.c
index 6422fb7..3da9326 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 */
 
@@ -179,7 +179,8 @@ int lws_client_socket_service(struct libwebsocket_context *context,
                                 * run into the connection timeout or win
                                 */
 
-                               lwsl_err("SSL connect error %s\n",
+                               lwsl_err("SSL connect error %lu: %s\n", 
+                                       ERR_get_error(),
                                        ERR_error_string(ERR_get_error(),
                                              (char *)context->service_buffer));
                                return 0;
@@ -596,8 +597,7 @@ check_accept:
        }
 
        /* allocate the per-connection user memory (if any) */
-       if (wsi->protocol->per_session_data_size &&
-                                        !libwebsocket_ensure_user_space(wsi)) {
+       if (libwebsocket_ensure_user_space(wsi)) {
                lwsl_err("Problem allocating wsi user mem\n");
                goto bail2;
        }