TT#14008 fix compilation for libwebsockets 3.x

closes #1087

Change-Id: I2178d577a6913a13c1a3df7caa46978c1423501f
pull/1093/head
Richard Fuchs 5 years ago
parent 4902b07ff9
commit ca86f81a53

@ -533,12 +533,14 @@ static int websocket_http(struct lws *wsi, enum lws_callback_reasons reason, voi
case LWS_CALLBACK_PROTOCOL_DESTROY:
case LWS_CALLBACK_FILTER_NETWORK_CONNECTION:
case LWS_CALLBACK_FILTER_HTTP_CONNECTION:
#if LWS_LIBRARY_VERSION_MAJOR >= 4
case LWS_CALLBACK_HTTP_CONFIRM_UPGRADE:
case LWS_CALLBACK_HTTP_BIND_PROTOCOL:
#endif
#if LWS_LIBRARY_VERSION_MAJOR >= 3
case LWS_CALLBACK_ADD_HEADERS:
case LWS_CALLBACK_HTTP_BIND_PROTOCOL:
case LWS_CALLBACK_HTTP_DROP_PROTOCOL:
case LWS_CALLBACK_EVENT_WAIT_CANCELLED: // ?
case LWS_CALLBACK_HTTP_CONFIRM_UPGRADE:
#endif
break;
case LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION:
@ -595,12 +597,14 @@ static int websocket_protocol(struct lws *wsi, enum lws_callback_reasons reason,
case LWS_CALLBACK_PROTOCOL_INIT:
case LWS_CALLBACK_PROTOCOL_DESTROY:
case LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION:
#if LWS_LIBRARY_VERSION_MAJOR >= 4
case LWS_CALLBACK_WS_SERVER_BIND_PROTOCOL:
case LWS_CALLBACK_WS_SERVER_DROP_PROTOCOL:
#endif
#if LWS_LIBRARY_VERSION_MAJOR >= 3
case LWS_CALLBACK_ADD_HEADERS:
case LWS_CALLBACK_HTTP_BIND_PROTOCOL:
case LWS_CALLBACK_EVENT_WAIT_CANCELLED: // ?
case LWS_CALLBACK_WS_SERVER_BIND_PROTOCOL:
case LWS_CALLBACK_WS_SERVER_DROP_PROTOCOL:
case LWS_CALLBACK_WS_PEER_INITIATED_CLOSE:
#endif
break;
@ -729,7 +733,7 @@ int websocket_init(void) {
struct lws_context_creation_info wci = {
.options = LWS_SERVER_OPTION_EXPLICIT_VHOSTS |
#if LWS_LIBRARY_VERSION_MAJOR >= 3
#if LWS_LIBRARY_VERSION_MAJOR >= 4
LWS_SERVER_OPTION_FAIL_UPON_UNABLE_TO_BIND |
#endif
0,

Loading…
Cancel
Save