mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-17 19:30:36 +00:00
fix SNTP through proper protocol handler setup
This commit is contained in:
1 parent
67255ce8f5
commit
8bf9d09d96
8 files changed
+39
-30
No files matched your search
+1
-2
@@ -529,12 +529,11 @@ void mg_mqtt_disconnect(struct mg_connection *c,
|
||||
struct mg_connection *mg_mqtt_connect(struct mg_mgr *mgr, const char *url,
|
||||
const struct mg_mqtt_opts *opts,
|
||||
mg_event_handler_t fn, void *fn_data) {
|
||||
struct mg_connection *c = mg_connect(mgr, url, fn, fn_data);
|
||||
struct mg_connection *c = mg_connect_svc(mgr, url, fn, fn_data, mqtt_cb, NULL);
|
||||
if (c != NULL) {
|
||||
struct mg_mqtt_opts empty;
|
||||
memset(&empty, 0, sizeof(empty));
|
||||
mg_mqtt_login(c, opts == NULL ? &empty : opts);
|
||||
c->pfn = mqtt_cb;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user