1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

mqtt: throw an error if no publish and subscribe topic is given

This commit is contained in:
Steffen Vogel 2019-01-12 13:48:52 +01:00
parent c2f83b01fd
commit 0d767ca697

View file

@ -171,6 +171,9 @@ int mqtt_parse(struct node *n, json_t *cfg)
m->username = username ? strdup(username) : NULL;
m->password = password ? strdup(password) : NULL;
if (!m->publish && !m->subscribe)
error("At least one topic has to be specified for node %s", node_name(n));
if (json_ssl) {
const char *cafile = NULL;
const char *capath = NULL;