diff --git a/Makefile b/Makefile index b8bceb42..b3be6b96 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ endif all: mg_prefix unamalgamated unpacked test test++ arm examples vc98 vc2017 mingw mingw++ linux linux++ fuzz examples: - @for X in $(EXAMPLES); do $(MAKE) -C $$X example || break; done + @for X in $(EXAMPLES); do test -f $$X/Makefile || continue; $(MAKE) -C $$X example || exit 1; done test/packed_fs.c: Makefile src/fs.h src/ssi.h test/fuzz.c test/data/a.txt $(CC) $(CFLAGS) test/pack.c -o pack diff --git a/examples/mqtt-server/main.c b/examples/mqtt-server/main.c index bf1147d9..a9d12a09 100644 --- a/examples/mqtt-server/main.c +++ b/examples/mqtt-server/main.c @@ -78,7 +78,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { for (struct sub *sub = s_subs; sub != NULL; sub = sub->next) { if (mg_globmatch(sub->topic.ptr, sub->topic.len, mm->topic.ptr, mm->topic.len)) { - mg_mqtt_pub(sub->c, &mm->topic, &mm->data, 1, false); + mg_mqtt_pub(sub->c, mm->topic, mm->data, 1, false); } } break;