From cea8ad2877e11a628aba7867429a1e3bdeca621c Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 23 Aug 2017 15:46:29 +0200 Subject: [PATCH] web: protocols[0] must handle HTTP requests --- lib/web.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/web.c b/lib/web.c index b915ed172..1cea1d528 100644 --- a/lib/web.c +++ b/lib/web.c @@ -37,14 +37,6 @@ 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", @@ -59,6 +51,14 @@ static struct lws_protocols protocols[] = { .rx_buffer_size = 0 }, #endif /* WITH_API */ +#ifdef WITH_WEBSOCKET + { + .name = "live", + .callback = websocket_protocol_cb, + .per_session_data_size = sizeof(struct websocket_connection), + .rx_buffer_size = 0 + }, +#endif /* WITH_WEBSOCKET */ #if 0 /* not supported yet */ { .name = "log",