diff -r 442357970a34 -r dafbbd5e9922 coolers/mosquitto.c --- a/coolers/mosquitto.c Sat May 17 10:50:16 2014 +0200 +++ b/coolers/mosquitto.c Sat May 17 23:06:39 2014 +0200 @@ -42,7 +42,7 @@ static bool disconnect_sent = false; static bool connect_lost = false; -extern bool shutdown; +extern bool my_shutdown; extern bool debug; extern sys_config Config; extern int lcdHandle; @@ -67,7 +67,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 { @@ -330,7 +330,7 @@ } } - if (shutdown) { + if (my_shutdown) { /* * Final publish 0 to clients//coolers/state */ @@ -338,9 +338,9 @@ mosquitto_publish(mymosq, &mid_sent, state, strlen(buf), buf, qos, true); last_mid = mid_sent; status = STATUS_WAITING; - lcdClear(lcdHandle); - lcdPosition(lcdHandle, 0, 0); - lcdPuts(lcdHandle, "Shuting down ..."); + mb_lcdClear(lcdHandle); +// lcdPosition(lcdHandle, 0, 0); + mb_lcdPuts(lcdHandle, "Shuting down ..."); } } else if (status == STATUS_WAITING) {