273 if (tmp3->beer_address) { |
273 if (tmp3->beer_address) { |
274 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_ADDRESS", "%s", tmp3->beer_address); |
274 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_ADDRESS", "%s", tmp3->beer_address); |
275 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_STATE", "%d", tmp3->beer_state); |
275 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_STATE", "%d", tmp3->beer_state); |
276 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_TEMPERATURE", "%d", tmp3->beer_temperature); |
276 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_TEMPERATURE", "%d", tmp3->beer_temperature); |
277 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_IDX", "%d", tmp3->beer_idx); |
277 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_IDX", "%d", tmp3->beer_idx); |
|
278 if (tmp3->beer_address2) { |
|
279 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_ADDRESS2", "%s", tmp3->beer_address2); |
|
280 } |
278 } |
281 } |
279 if (tmp3->chiller_address) { |
282 if (tmp3->chiller_address) { |
280 xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_ADDRESS", "%s", tmp3->chiller_address); |
283 xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_ADDRESS", "%s", tmp3->chiller_address); |
281 xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_STATE", "%d", tmp3->chiller_state); |
284 xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_STATE", "%d", tmp3->chiller_state); |
282 xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_TEMPERATURE", "%d", tmp3->chiller_temperature); |
285 xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_TEMPERATURE", "%d", tmp3->chiller_temperature); |
642 xmlFree(key); |
645 xmlFree(key); |
643 } |
646 } |
644 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_ADDRESS"))) { |
647 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_ADDRESS"))) { |
645 unit->beer_address = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
648 unit->beer_address = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
646 } |
649 } |
|
650 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_ADDRESS2"))) { |
|
651 unit->beer_address2 = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
|
652 } |
647 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_STATE"))) { |
653 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_STATE"))) { |
648 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
654 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
649 if (sscanf((const char *)key, "%d", &ival) == 1) |
655 if (sscanf((const char *)key, "%d", &ival) == 1) |
650 unit->beer_state = ival; |
656 unit->beer_state = ival; |
651 xmlFree(key); |
657 xmlFree(key); |