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 */ } };