mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
renaming variable to improve readability
This commit is contained in:
parent
19523377f4
commit
3624cb9fca
1 changed files with 6 additions and 6 deletions
|
@ -39,23 +39,23 @@ static void * mosquitto_loop_thread(void *ctx)
|
|||
int ret;
|
||||
while(true){
|
||||
for (unsigned i = 0; i < vlist_length(&clients); i++) {
|
||||
struct node *c = (struct node *) vlist_at(&clients, i);
|
||||
struct mqtt *m = (struct mqtt *) c->_vd;
|
||||
struct node *node = (struct node *) vlist_at(&clients, i);
|
||||
struct mqtt *m = (struct mqtt *) node->_vd;
|
||||
|
||||
// execute mosquitto loop for this client
|
||||
ret = mosquitto_loop(m->client, 0, 1);
|
||||
if(ret){
|
||||
warning("MQTT: connection error for node %s: %s, attempting reconnect", node_name(c), mosquitto_strerror(ret));
|
||||
warning("MQTT: connection error for node %s: %s, attempting reconnect", node_name(node), mosquitto_strerror(ret));
|
||||
ret = mosquitto_reconnect(m->client);
|
||||
if(ret != MOSQ_ERR_SUCCESS){
|
||||
error("MQTT: reconnection to broker failed for node %s: %s", node_name(c), mosquitto_strerror(ret));
|
||||
error("MQTT: reconnection to broker failed for node %s: %s", node_name(node), mosquitto_strerror(ret));
|
||||
}
|
||||
else{
|
||||
warning("MQTT: successfully reconnected to broker for node %s: %s", node_name(c), mosquitto_strerror(ret));
|
||||
warning("MQTT: successfully reconnected to broker for node %s: %s", node_name(node), mosquitto_strerror(ret));
|
||||
}
|
||||
ret = mosquitto_loop(m->client, -1, 1);
|
||||
if(ret != MOSQ_ERR_SUCCESS){
|
||||
error("MQTT: persisting connection error for node %s: %s", node_name(c), mosquitto_strerror(ret));
|
||||
error("MQTT: persisting connection error for node %s: %s", node_name(node), mosquitto_strerror(ret));
|
||||
}
|
||||
}
|
||||
} // for loop
|
||||
|
|
Loading…
Add table
Reference in a new issue