diff -r 901ca9858a7a -r 116226a8c70a thermferm/rdconfig.c --- a/thermferm/rdconfig.c Thu Jul 03 23:11:44 2014 +0200 +++ b/thermferm/rdconfig.c Fri Jul 04 20:00:19 2014 +0200 @@ -418,10 +418,14 @@ syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteElement"); return 1; } - if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "DURATION", "%d", tmp5->duration)) < 0) { + if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "RESTTIME", "%d", tmp5->resttime)) < 0) { syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); return 1; } + if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "STEPTIME", "%d", tmp5->steptime)) < 0) { + syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); + return 1; + } if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "TARGET", "%.1f", tmp5->target)) < 0) { syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); return 1; @@ -791,7 +795,7 @@ step = (prof_step *)malloc(sizeof(prof_step)); step->next = NULL; step->version = 1; - step->duration = 0; + step->steptime = step->resttime = 0; step->target = 20.0; cur = cur->xmlChildrenNode; @@ -805,10 +809,16 @@ step->version = 1; xmlFree(key); } - if ((!xmlStrcmp(cur->name, (const xmlChar *)"DURATION"))) { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"RESTTIME"))) { key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (sscanf((const char *)key, "%d", &ival) == 1) - step->duration = ival; + step->resttime = ival; + xmlFree(key); + } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"STEPTIME"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%d", &ival) == 1) + step->steptime = ival; xmlFree(key); } if ((!xmlStrcmp(cur->name, (const xmlChar *)"TARGET"))) {