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:
parent
c2f83b01fd
commit
0d767ca697
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue