Commit f2e7facb authored by Marko Mikulicic's avatar Marko Mikulicic Committed by Cesanta Bot

Fix master build

amalgamation, ansi C and queue.h usage issue

PUBLISHED_FROM=96a2b8a90d590da0f2d9939c1d2bc7a64d1fe36a
parent f1b4f0c4
...@@ -8631,7 +8631,7 @@ static void mg_mqtt_close_session(struct mg_mqtt_session *s) { ...@@ -8631,7 +8631,7 @@ static void mg_mqtt_close_session(struct mg_mqtt_session *s) {
} }
void mg_mqtt_broker_init(struct mg_mqtt_broker *brk, void *user_data) { void mg_mqtt_broker_init(struct mg_mqtt_broker *brk, void *user_data) {
LIST_EMPTY(&brk->sessions); LIST_INIT(&brk->sessions);
brk->user_data = user_data; brk->user_data = user_data;
} }
...@@ -8742,7 +8742,7 @@ void mg_mqtt_broker(struct mg_connection *nc, int ev, void *data) { ...@@ -8742,7 +8742,7 @@ void mg_mqtt_broker(struct mg_connection *nc, int ev, void *data) {
switch (ev) { switch (ev) {
case MG_EV_ACCEPT: case MG_EV_ACCEPT:
mg_set_protocol_mqtt(nc); mg_set_protocol_mqtt(nc);
nc->user_data = NULL; // This is NOT a listening connection nc->user_data = NULL; /* Clear up the inherited pointer to broker */
break; break;
case MG_EV_MQTT_CONNECT: case MG_EV_MQTT_CONNECT:
mg_mqtt_broker_handle_connect(brk, nc); mg_mqtt_broker_handle_connect(brk, nc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment