diff -r 0882292322b3 -r 264e5ee5abfc thermferm/rdconfig.c --- a/thermferm/rdconfig.c Fri Jul 25 23:28:44 2014 +0200 +++ b/thermferm/rdconfig.c Sat Jul 26 13:18:00 2014 +0200 @@ -444,6 +444,10 @@ syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); return 1; } + if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "BUSY", "%d", tmp4->busy)) < 0) { + syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); + return 1; + } if (tmp4->steps) { if ((rc = xmlTextWriterStartElement(writer, BAD_CAST "STEPS")) < 0) { syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterStartElement"); @@ -928,11 +932,13 @@ { xmlChar *key; profiles_list *profile, *tmp; + int ival; profile = (profiles_list *)malloc(sizeof(profiles_list)); profile->next = NULL; profile->version = 1; profile->uuid = profile->name = NULL; + profile->busy = 0; profile->steps = NULL; cur = cur->xmlChildrenNode; @@ -952,6 +958,12 @@ if ((!xmlStrcmp(cur->name, (const xmlChar *)"NAME"))) { profile->name = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"BUSY"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%d", &ival) == 1) + profile->busy = ival; + xmlFree(key); + } if ((!xmlStrcmp(cur->name, (const xmlChar *)"STEPS"))) { parseSteps(doc, cur, &(profile)->steps); }