mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-01 13:10:43 +00:00
Extend mg_mqtt_{pub,sub} by adding qos and retain
This commit is contained in:
1 parent
a15d518571
commit
3deafaea7f
8 files changed
+39
-63
No files matched your search
@@ -55,7 +55,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
mm->data.ptr, (int) mm->topic.len, mm->topic.ptr));
|
||||
for (struct sub *sub = s_subs; sub != NULL; sub = sub->next) {
|
||||
if (mg_strcmp(mm->topic, sub->topic) != 0) continue;
|
||||
mg_mqtt_pub(sub->c, &mm->topic, &mm->data);
|
||||
mg_mqtt_pub(sub->c, &mm->topic, &mm->data, 1, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user