Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-who committed Apr 13, 2024
1 parent cf595f0 commit 9071115
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions spit/cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ char *clusterDumpJSONString(clusterType *c) {
buf += sprintf(buf, " {\n");
buf += sprintf(buf, " \"node\": \"%s\",\n", c->node[i]->name);
buf += sprintf(buf, " \"nodename\": \"%s\",\n", tmp=keyvalueGetString(c->node[i]->info, "nodename")); free(tmp);
buf += sprintf(buf, " \"nodehw\": \"%s\",\n", tmp=keyvalueGetString(c->node[i]->info, "nodehw")); free(tmp);
buf += sprintf(buf, " \"nodedowntime\": %lf,\n", c->node[i]->nodedowntime);
buf += sprintf(buf, " \"badsince\": %lf,\n", c->node[i]->badsince);
buf += sprintf(buf, " \"nodeOS\": \"%s\",\n", tmp = keyvalueGetString(c->node[i]->info, "nodeOS")); free(tmp);
Expand Down
6 changes: 5 additions & 1 deletion spit/respond-mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ void *respondMC(void *arg) {
char *tmp = keyvalueGetString(kv, "nodename"); // human readable
keyvalueSetString(tc->cluster->node[nodeid]->info, "nodename", tmp);
free(tmp);


tmp = keyvalueGetString(kv, "nodeHW"); // human readable
keyvalueSetString(tc->cluster->node[nodeid]->info, "nodehw", tmp);
free(tmp);

keyvalueSetString(tc->cluster->node[nodeid]->info, "ip", ipaddr);

tmp=keyvalueGetString(kv, "nodeOS");
Expand Down

0 comments on commit 9071115

Please sign in to comment.