mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix indention
This commit is contained in:
parent
7c555ccb9c
commit
b70c86cff6
1 changed files with 9 additions and 9 deletions
|
@ -391,16 +391,16 @@ int mqtt_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *re
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if(m->publish) {
|
||||
ret = mosquitto_publish(m->client, NULL /* mid */, m->publish, wbytes, data, m->qos,
|
||||
if (m->publish) {
|
||||
ret = mosquitto_publish(m->client, NULL /* mid */, m->publish, wbytes, data, m->qos,
|
||||
m->retain);
|
||||
if (ret != MOSQ_ERR_SUCCESS) {
|
||||
warn("MQTT: publish failed for node %s: %s", node_name(n), mosquitto_strerror(ret));
|
||||
return -abs(ret);
|
||||
}
|
||||
}
|
||||
else{
|
||||
warn("MQTT: no publish for node %s possible because no publish topic is given", node_name(n));
|
||||
if (ret != MOSQ_ERR_SUCCESS) {
|
||||
warn("MQTT: publish failed for node %s: %s", node_name(n), mosquitto_strerror(ret));
|
||||
return -abs(ret);
|
||||
}
|
||||
}
|
||||
else {
|
||||
warn("MQTT: no publish for node %s possible because no publish topic is given", node_name(n));
|
||||
}
|
||||
|
||||
return cnt;
|
||||
|
|
Loading…
Add table
Reference in a new issue