mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
mqtt: fix initialization
This commit is contained in:
parent
ffa57f5e7a
commit
925a315ca5
1 changed files with 13 additions and 0 deletions
|
@ -195,8 +195,19 @@ int mqtt_init(struct vnode *n)
|
|||
m->qos = 0;
|
||||
m->retain = 0;
|
||||
m->keepalive = 1; /* 1 second */
|
||||
|
||||
m->host = nullptr;
|
||||
m->username = nullptr;
|
||||
m->password = nullptr;
|
||||
m->publish = nullptr;
|
||||
m->subscribe = nullptr;
|
||||
|
||||
m->ssl.enabled = 0;
|
||||
m->ssl.insecure = 0;
|
||||
m->ssl.cafile = nullptr;
|
||||
m->ssl.capath = nullptr;
|
||||
m->ssl.certfile = nullptr;
|
||||
m->ssl.keyfile = nullptr;
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -249,6 +260,8 @@ int mqtt_parse(struct vnode *n, json_t *cfg)
|
|||
throw ConfigError(cfg, "node-config-node-mqtt", "At least one topic has to be specified for node {}", node_name(n));
|
||||
|
||||
if (json_ssl) {
|
||||
m->ssl.enabled = 1;
|
||||
|
||||
const char *cafile = nullptr;
|
||||
const char *capath = nullptr;
|
||||
const char *certfile = nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue