# HG changeset patch # User Michiel Broek # Date 1409751481 -7200 # Node ID 674efa17be1de3155c9c760efc927c1d8b56f5b9 # Parent bbe73c2ecacf7649188ae1f9299e3a5b5dd1272c The global system name was not saved or restored from the configuration file. diff -r bbe73c2ecacf -r 674efa17be1d thermferm/rdconfig.c --- a/thermferm/rdconfig.c Wed Sep 03 15:29:46 2014 +0200 +++ b/thermferm/rdconfig.c Wed Sep 03 15:38:01 2014 +0200 @@ -199,6 +199,10 @@ syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteElement"); return 1; } + if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "NAME", "%s", Config.name)) < 0) { + syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); + return 1; + } if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "LISTEN_PORT", "%d", Config.my_port)) < 0) { syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); return 1; @@ -1595,6 +1599,9 @@ } xmlFree(key); } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME"))) { + Config.name = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + } if ((!xmlStrcmp(cur->name, (const xmlChar *)"LISTEN_PORT"))) { key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (sscanf((const char *)key, "%d", &ival) == 1)