From 9eeeb9493e71559823b0b3816ec057a8b2447a9c Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 22 Aug 2017 12:12:49 +0200 Subject: [PATCH] web: change order of LWS protocols --- lib/web.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/web.c b/lib/web.c index be6a126b6..72785f226 100644 --- a/lib/web.c +++ b/lib/web.c @@ -38,6 +38,14 @@ lws_callback_function websocket_protocol_cb; /** List of libwebsockets protocols. */ static struct lws_protocols protocols[] = { +#ifdef WITH_WEBSOCKET + { + .name = "live", + .callback = websocket_protocol_cb, + .per_session_data_size = sizeof(struct websocket_connection), + .rx_buffer_size = 0 + }, +#endif /* WITH_WEBSOCKET */ #ifdef WITH_API { .name = "http-api", @@ -66,14 +74,6 @@ static struct lws_protocols protocols[] = { .rx_buffer_size = 0 }, #endif -#ifdef WITH_WEBSOCKET - { - .name = "live", - .callback = websocket_protocol_cb, - .per_session_data_size = sizeof(struct websocket_connection), - .rx_buffer_size = 0 - }, -#endif /* WITH_WEBSOCKET */ { NULL /* terminator */ } };