summaryrefslogtreecommitdiff
path: root/src/common/xml.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-07-10 14:47:37 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-07-10 14:47:37 (GMT)
commitdb863244b804cbf4c06399f7c6f8241d91c9ee9b (patch)
treeda7cc911b0f10c5122536271235ab68f2202804a /src/common/xml.c
parente8aa314462196cc9e8461ae23eb13f8bffcc983f (diff)
Fully rewritten the core configuration system.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@381 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/common/xml.c')
-rw-r--r--src/common/xml.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/common/xml.c b/src/common/xml.c
index 8c4cc81..36171b3 100644
--- a/src/common/xml.c
+++ b/src/common/xml.c
@@ -223,11 +223,24 @@ char *qck_get_node_text_value(xmlNodePtr node)
result = NULL;
if (node != NULL)
+ {
if (node->children != NULL)
if (node->children->content != NULL)
result = strdup((char *)node->children->content);
- if (result == NULL) XML_LOG(stderr, "No text value for node '%s'\n", node->name);
+ /**
+ * Si le noeud existe mais qu'il n'y pas de contenu,
+ * il faut marquer la différence entre deux retours NULL.
+ *
+ * On choisit donc :
+ * - NULL : pas de valeur trouvée car noeud non existant.
+ * - "" : pas de valeur trouvée, mais noeud bien présent.
+ */
+
+ if (result == NULL)
+ result = strdup("");
+
+ }
return result;