thermferm/mqtt.c

changeset 500
5aa914eb644e
parent 499
602d9968960f
child 504
862de87f9f89
--- a/thermferm/mqtt.c	Mon May 02 16:15:37 2016 +0200
+++ b/thermferm/mqtt.c	Mon May 09 21:35:55 2016 +0200
@@ -67,13 +67,13 @@
 void my_disconnect_callback(struct mosquitto *my_mosq, void *obj, int rc)
 {
     if (mqtt_my_shutdown) {
-       syslog(LOG_NOTICE, "MQTT: acknowledged DISCONNECT from %s", Config.mosq_host);
+       syslog(LOG_NOTICE, "MQTT: acknowledged DISCONNECT from %s", Config.mqtt_host);
        mqtt_connected = FALSE;
     } else {
        /*
         * The remote server was brought down. We must keep running
         */
-       syslog(LOG_NOTICE, "MQTT: received DISCONNECT from %s, connection lost", Config.mosq_host);
+       syslog(LOG_NOTICE, "MQTT: received DISCONNECT from %s, connection lost", Config.mqtt_host);
        mqtt_connect_lost = TRUE;
     }
 }
@@ -161,7 +161,7 @@
     mosquitto_disconnect_callback_set(mosq, my_disconnect_callback);
     mosquitto_publish_callback_set(mosq, my_publish_callback);
 
-    if ((rc = mosquitto_connect(mosq, Config.mosq_host, Config.mosq_port, keepalive))) {
+    if ((rc = mosquitto_connect(mosq, Config.mqtt_host, Config.mqtt_port, keepalive))) {
         if (rc == MOSQ_ERR_ERRNO) {
             strerror_r(errno, err, 1024);
             syslog(LOG_NOTICE, "MQTT: mosquitto_connect: error: %s", err);
@@ -172,7 +172,7 @@
 	syslog(LOG_NOTICE, "MQTT: will run without an MQTT broker.");
     } else {
         mqtt_use = TRUE;
-        syslog(LOG_NOTICE, "MQTT: connected with %s:%d", Config.mosq_host, Config.mosq_port);
+        syslog(LOG_NOTICE, "MQTT: connected with %s:%d", Config.mqtt_host, Config.mqtt_port);
 
         /*
          * Initialise is complete, report our presence state

mercurial