}
g_free(path);
if (!r)
- g_message("unable to find a valid config file, using defaults");
+ g_warning("unable to find a valid config file, using defaults");
return r;
}
struct Callback *c = g_hash_table_lookup(callbacks, node->name);
if (c)
- c->func(doc, node->xmlChildrenNode, c->data);
+ c->func(doc, node, c->data);
node = node->next;
}
char *parse_string(xmlDocPtr doc, xmlNodePtr node)
{
xmlChar *c = xmlNodeListGetString(doc, node->xmlChildrenNode, TRUE);
- char *s = g_strdup((char*)c);
+ char *s = g_strdup(c ? (char*)c : "");
xmlFree(c);
return s;
}