FIX: now compiles without MQTT

addresses #401
This commit is contained in:
Jan-Piet Mens
2022-09-23 22:10:48 +02:00
parent 2198b5f279
commit 2fe60c9684

View File

@@ -494,10 +494,12 @@ void do_request(struct udata *ud, UT_string *username, UT_string *device, char *
return;
}
#ifdef WITH_MQTT
if ((js = json_stringify(resp, " ")) != NULL) {
publish(ud, UB(fulltopic), js);
free(js);
}
#endif
json_delete(resp);
} else if (strcmp(request_type, "tours") == 0) {
@@ -558,10 +560,12 @@ void do_request(struct udata *ud, UT_string *username, UT_string *device, char *
return;
}
#ifdef WITH_MQTT
if ((js = json_stringify(resp, " ")) != NULL) {
publish(ud, UB(fulltopic), js);
free(js);
}
#endif
json_delete(resp);