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

fix ssl support and confirm builds clean when not configured

Signed-off-by: Andy Green <andy@warmcat.com>
This commit is contained in:
Andy Green 2011-02-14 21:14:37 +00:00
parent 038d582bde
commit 1f9bf527ec

View file

@ -87,6 +87,19 @@ delete_from_fd(struct libwebsocket_context *this, int fd)
return 1;
}
#ifdef LWS_OPENSSL_SUPPORT
static void
libwebsockets_decode_ssl_error(void)
{
char buf[256];
u_long err;
while ((err = ERR_get_error()) != 0) {
ERR_error_string_n(err, buf, sizeof(buf));
fprintf(stderr, "*** %s\n", buf);
}
}
#endif
void
libwebsocket_close_and_free_session(struct libwebsocket_context *this,
@ -402,7 +415,6 @@ libwebsocket_service_fd(struct libwebsocket_context *this,
#ifdef LWS_OPENSSL_SUPPORT
new_wsi->ssl = NULL;
this->ssl_ctx = NULL;
if (this->use_ssl) {
@ -411,6 +423,7 @@ libwebsocket_service_fd(struct libwebsocket_context *this,
fprintf(stderr, "SSL_new failed: %s\n",
ERR_error_string(SSL_get_error(
new_wsi->ssl, 0), NULL));
libwebsockets_decode_ssl_error();
free(new_wsi);
break;
}
@ -1348,7 +1361,6 @@ static void sigpipe_handler(int x)
}
/**
* libwebsocket_create_context() - Create the websocket handler
* @port: Port to listen on... you can use 0 to suppress listening on