thermferm/mqtt.c

changeset 669
daa22055cd3d
parent 666
48cc8868f9f4
child 675
825210ba2707
equal deleted inserted replaced
668:4df4c8b17733 669:daa22055cd3d
406 if (json_object_object_get_ex(jobj, "metric", &metric)) { 406 if (json_object_object_get_ex(jobj, "metric", &metric)) {
407 if ((json_object_object_get_ex(metric, "Node Control/Reboot", &val)) && (strcmp(message_type, "NCMD") == 0)) { 407 if ((json_object_object_get_ex(metric, "Node Control/Reboot", &val)) && (strcmp(message_type, "NCMD") == 0)) {
408 if (json_object_get_boolean(val) == true) { 408 if (json_object_get_boolean(val) == true) {
409 syslog(LOG_NOTICE, "MQTT: `Node Control/Reboot' command"); 409 syslog(LOG_NOTICE, "MQTT: `Node Control/Reboot' command");
410 /* 410 /*
411 * Reboot. The erver process will restart which is handled 411 * Restart. The server process will restart which is handled
412 * in the main thread loop. 412 * in the main thread loop.
413 */ 413 */
414 my_reboot = my_shutdown = TRUE; 414 my_reboot = my_shutdown = TRUE;
415 return; 415 return;
416 } 416 }

mercurial