Skip to content
Snippets Groups Projects
Commit b49a995a authored by Andy Green's avatar Andy Green
Browse files

clean small additional ifdef reduction

parent aad2eac4
No related branches found
No related tags found
No related merge requests found
...@@ -217,17 +217,8 @@ libwebsocket_create_context(struct lws_context_creation_info *info) ...@@ -217,17 +217,8 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
#ifndef LWS_NO_EXTENSIONS #ifndef LWS_NO_EXTENSIONS
context->extensions = info->extensions; context->extensions = info->extensions;
#endif #endif
context->last_timeout_check_s = 0;
context->user_space = info->user; context->user_space = info->user;
#ifdef LWS_OPENSSL_SUPPORT
context->use_ssl = 0;
context->allow_non_ssl_on_ssl_port = 0;
context->ssl_ctx = NULL;
context->ssl_client_ctx = NULL;
openssl_websocket_private_data_index = 0;
#endif
strcpy(context->canonical_hostname, "unknown"); strcpy(context->canonical_hostname, "unknown");
#ifndef LWS_NO_SERVER #ifndef LWS_NO_SERVER
...@@ -269,11 +260,10 @@ libwebsocket_create_context(struct lws_context_creation_info *info) ...@@ -269,11 +260,10 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
#endif #endif
} }
if (context->http_proxy_address[0]) { if (context->http_proxy_address[0])
lwsl_notice(" Proxy %s:%u\n", lwsl_notice(" Proxy %s:%u\n",
context->http_proxy_address, context->http_proxy_address,
context->http_proxy_port); context->http_proxy_port);
}
#ifndef LWS_NO_SERVER #ifndef LWS_NO_SERVER
if (info->port != CONTEXT_PORT_NO_LISTEN) { if (info->port != CONTEXT_PORT_NO_LISTEN) {
......
...@@ -231,15 +231,6 @@ handle_truncated_send: ...@@ -231,15 +231,6 @@ handle_truncated_send:
return n; return n;
} }
#ifdef LWS_NO_EXTENSIONS
int
lws_issue_raw_ext_access(struct libwebsocket *wsi,
unsigned char *buf, size_t len)
{
return lws_issue_raw(wsi, buf, len);
}
#endif
/** /**
* libwebsocket_write() - Apply protocol then write data to client * libwebsocket_write() - Apply protocol then write data to client
* @wsi: Websocket instance (available from user callback) * @wsi: Websocket instance (available from user callback)
......
...@@ -668,6 +668,7 @@ lws_ext_callback_for_each_extension_type( ...@@ -668,6 +668,7 @@ lws_ext_callback_for_each_extension_type(
#define lws_any_extension_handled(_a, _b, _c, _d, _e) (0) #define lws_any_extension_handled(_a, _b, _c, _d, _e) (0)
#define lws_ext_callback_for_each_active(_a, _b, _c, _d) (0) #define lws_ext_callback_for_each_active(_a, _b, _c, _d) (0)
#define lws_ext_callback_for_each_extension_type(_a, _b, _c, _d, _e) (0) #define lws_ext_callback_for_each_extension_type(_a, _b, _c, _d, _e) (0)
#define lws_issue_raw_ext_access lws_issue_raw
#endif #endif
LWS_EXTERN int LWS_EXTERN int
...@@ -762,6 +763,7 @@ LWS_EXTERN int openssl_websocket_private_data_index; ...@@ -762,6 +763,7 @@ LWS_EXTERN int openssl_websocket_private_data_index;
LWS_EXTERN int lws_handshake_server(struct libwebsocket_context *context, LWS_EXTERN int lws_handshake_server(struct libwebsocket_context *context,
struct libwebsocket *wsi, unsigned char **buf, size_t len); struct libwebsocket *wsi, unsigned char **buf, size_t len);
#else #else
#define lws_server_socket_service(_a, _b, _c) (0)
#define _libwebsocket_rx_flow_control(_a) (0) #define _libwebsocket_rx_flow_control(_a) (0)
#define lws_handshake_server(_a, _b, _c, _d) (0) #define lws_handshake_server(_a, _b, _c, _d) (0)
#endif #endif
......
...@@ -335,15 +335,12 @@ libwebsocket_service_fd(struct libwebsocket_context *context, ...@@ -335,15 +335,12 @@ libwebsocket_service_fd(struct libwebsocket_context *context,
/* okay, what we came here to do... */ /* okay, what we came here to do... */
switch (wsi->mode) { switch (wsi->mode) {
#ifndef LWS_NO_SERVER
case LWS_CONNMODE_HTTP_SERVING: case LWS_CONNMODE_HTTP_SERVING:
case LWS_CONNMODE_HTTP_SERVING_ACCEPTED: case LWS_CONNMODE_HTTP_SERVING_ACCEPTED:
case LWS_CONNMODE_SERVER_LISTENER: case LWS_CONNMODE_SERVER_LISTENER:
case LWS_CONNMODE_SSL_ACK_PENDING: case LWS_CONNMODE_SSL_ACK_PENDING:
n = lws_server_socket_service(context, wsi, pollfd); n = lws_server_socket_service(context, wsi, pollfd);
goto handled; goto handled;
#endif
case LWS_CONNMODE_WS_SERVING: case LWS_CONNMODE_WS_SERVING:
case LWS_CONNMODE_WS_CLIENT: case LWS_CONNMODE_WS_CLIENT:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment