diff --git a/src/mosquitto_broker.h b/src/mosquitto_broker.h index 7d29e927..bd6a0ef7 100644 --- a/src/mosquitto_broker.h +++ b/src/mosquitto_broker.h @@ -31,7 +31,7 @@ Contributors: # define libwebsocket_write(A, B, C, D) lws_write((A), (B), (C), (D)) # define libwebsocket_get_socket_fd(A) lws_get_socket_fd((A)) # define libwebsockets_return_http_status(A, B, C, D) lws_return_http_status((B), (C), (D)) -# define libwebsocket_get_protocol(A) lws_get_protocol((A)) +# define libwebsockets_get_protocol(A) lws_get_protocol((A)) # define libwebsocket_context lws_context # define libwebsocket_protocols lws_protocols diff --git a/src/websockets.c b/src/websockets.c index c16bde7a..231cb72b 100644 --- a/src/websockets.c +++ b/src/websockets.c @@ -182,7 +182,7 @@ static int callback_mqtt(struct libwebsocket_context *context, case LWS_CALLBACK_ESTABLISHED: mosq = mqtt3_context_init(db, WEBSOCKET_CLIENT); if(mosq){ - p = libwebsocket_get_protocol(wsi); + p = libwebsockets_get_protocol(wsi); for (i=0; iconfig->listener_count; i++){ if (db->config->listeners[i].protocol == mp_websockets) { for (j=0; db->config->listeners[i].ws_protocol[j].name; j++){