- else if (xmlStrcmp(child->name, (const xmlChar *) "step") == 0)
- status = get_int_from_node(doc, child,
- (int *) &rrd->stat_head->pdp_step);
- else if (xmlStrcmp(child->name, (const xmlChar *) "lastupdate") == 0)
- status = get_int_from_node(doc, child,
- (int *) &rrd->live_head->last_up);
- else if (xmlStrcmp(child->name, (const xmlChar *) "ds") == 0)
- status = parse_tag_ds(doc, child, rrd);
- else if (xmlStrcmp(child->name, (const xmlChar *) "rra") == 0)
- status = parse_tag_rra(doc, child, rrd);
+ else if (xmlStrcasecmp(element, (const xmlChar *) "step") == 0)
+ status = get_xml_ulong(reader,
+ &rrd->stat_head->pdp_step);
+ else if (xmlStrcasecmp(element, (const xmlChar *) "lastupdate") == 0) {
+#ifdef TIME_T_IS_LONG
+ status = get_xml_long(reader, &rrd->live_head->last_up);
+#else
+#ifdef TIME_T_IS_LONG_LONG
+ status = get_xml_llong(reader, &rrd->live_head->last_up);
+#else
+ if (sizeof(time_t) == sizeof(long)) {
+ status = get_xml_long(reader,
+ (long *)&rrd->live_head->last_up);
+ }
+ else if (sizeof(time_t) == sizeof(long long)) {
+ status = get_xml_llong(reader,
+ (long long *)&rrd->live_head->last_up);
+ }
+#endif
+#endif
+ }
+ else if (xmlStrcasecmp(element, (const xmlChar *) "ds") == 0){
+ xmlFree(element);
+ status = parse_tag_ds(reader, rrd);
+ /* as we come back the </ds> tag is already gone */
+ if (status == 0)
+ continue;
+ else
+ return status;
+ }
+ else if (xmlStrcasecmp(element, (const xmlChar *) "rra") == 0){
+ xmlFree(element);
+ status = parse_tag_rra(reader, rrd);
+ if (status == 0)
+ continue;
+ else
+ return status;
+ }
+ else if (xmlStrcasecmp(element, (const xmlChar *) "/rrd") == 0) {
+ xmlFree(element);
+ return status;
+ }