thermometers/main.c

changeset 40
dafbbd5e9922
parent 28
32ed1ea4d0b6
child 45
053c4657105f
--- a/thermometers/main.c	Sat May 17 10:50:16 2014 +0200
+++ b/thermometers/main.c	Sat May 17 23:06:39 2014 +0200
@@ -37,7 +37,7 @@
 static bool		connected = true;
 static bool		disconnect_sent = false;
 static bool		connect_lost = false;
-static bool		shutdown = false;
+static bool		my_shutdown = false;
 static pid_t		pgrp, mypid;
 
 extern bool		debug;
@@ -73,7 +73,7 @@
 	default:	syslog(LOG_NOTICE, "die() on signal %d", onsig);
     }
 
-    shutdown = true;
+    my_shutdown = true;
 }
 
 
@@ -96,7 +96,7 @@
 
 void my_disconnect_callback(struct mosquitto *mosq, void *obj, int rc)
 {
-    if (shutdown) {
+    if (my_shutdown) {
 	syslog(LOG_NOTICE, "Acknowledged DISCONNECT from %s", Config.mosq_host);
 	connected = false;
     } else {
@@ -508,7 +508,7 @@
 	    }
 #endif
 
-	    if (shutdown) {
+	    if (my_shutdown) {
 		/*
 		 * Final publish 0 to clients/<hostname>/thermometers/state
 		 */

mercurial