Fix a wrong object name in websocket node json.

Fri, 24 Jun 2022 16:48:56 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 24 Jun 2022 16:48:56 +0200
changeset 792
36d51473aa81
parent 791
b7c7dc0a65c9
child 793
f7d0da7677ed

Fix a wrong object name in websocket node json.

bmsd/nodes.c file | annotate | diff | comparison | revisions
--- a/bmsd/nodes.c	Fri Jun 17 16:56:16 2022 +0200
+++ b/bmsd/nodes.c	Fri Jun 24 16:48:56 2022 +0200
@@ -3,7 +3,7 @@
  * @brief Handle nodes status
  * @author Michiel Broek <mbroek at mbse dot eu>
  *
- * Copyright (C) 2018-2020
+ * Copyright (C) 2018-2022
  *
  * This file is part of the bms (Brewery Management System)
  *
@@ -313,7 +313,7 @@
 	    tmpp->online = false;
 	    msg = xstrcpy((char *)"{\"node\":\"");
     	    msg = xstrcat(msg, edge_node);
-    	    msg = xstrcat(msg, (char *)"\",\"group\":\"");
+    	    msg = xstrcat(msg, (char *)"\",\"group_id\":\"");
     	    msg = xstrcat(msg, group_id);
     	    msg = xstrcat(msg, (char *)"\",\"online\":0}");
     	    ws_broadcast(msg);
@@ -344,11 +344,10 @@
 	    node_mysql_death(tmpn->node);
 	    msg = xstrcpy((char *)"{\"node\":\"");
             msg = xstrcat(msg, tmpn->node);
-            msg = xstrcat(msg, (char *)"\",\"group\":\"");
+            msg = xstrcat(msg, (char *)"\",\"group_id\":\"");
             msg = xstrcat(msg, tmpn->group_id);
             msg = xstrcat(msg, (char *)"\",\"online\":0}");
             ws_broadcast(msg);
-syslog(LOG_NOTICE, msg);
             free(msg);
             msg = NULL;
 

mercurial