summaryrefslogtreecommitdiffstats
path: root/database/sqlite/administration/configuration.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-09-21 19:04:36 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-09-21 19:04:36 +0200
commit8fc41296cd27af9757f571627f7fd16befc9b8aa (patch)
tree9a2d242654c938ae0b0a327d649f7d7e7f875586 /database/sqlite/administration/configuration.c
parent854f3bb476a3cb7cf370c0f7690d9a376d219609 (diff)
downloadeurephia-8fc41296cd27af9757f571627f7fd16befc9b8aa.tar.gz
eurephia-8fc41296cd27af9757f571627f7fd16befc9b8aa.tar.xz
eurephia-8fc41296cd27af9757f571627f7fd16befc9b8aa.zip
Rewrote eurephiaXML_ResultMsg() to also support adding an xmlNode* with more info
The eurephia result XML document is also changed, and all parsing of the result must be rewritten. To simplify this parsing, a new function is introduced, eurephiaXML_ParseResultMsg().
Diffstat (limited to 'database/sqlite/administration/configuration.c')
-rw-r--r--database/sqlite/administration/configuration.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/database/sqlite/administration/configuration.c b/database/sqlite/administration/configuration.c
index e27b257..dbf033e 100644
--- a/database/sqlite/administration/configuration.c
+++ b/database/sqlite/administration/configuration.c
@@ -155,7 +155,7 @@ xmlDoc *validate_key_value(eurephiaCTX *ctx, const char *key, const char *value)
v_null = (value == NULL ? 1 : 0);
if( k_null || v_null ) {
- return eurephiaXML_ResultMsg(ctx, exmlERROR, "%s%s%s",
+ return eurephiaXML_ResultMsg(ctx, exmlERROR, NULL, "%s%s%s",
(k_null ? "The key attribute was not set" : ""),
(k_null && v_null ? " and " : ""),
(v_null ? "The value tag was not set" : "")
@@ -200,11 +200,11 @@ xmlDoc *eDBadminConfiguration(eurephiaCTX *ctx, xmlDoc *cfgxml) {
}
if( config_set(ctx, key, value) ) {
- resxml = eurephiaXML_ResultMsg(ctx, exmlRESULT,
+ resxml = eurephiaXML_ResultMsg(ctx, exmlRESULT, NULL,
"Configuration key '%s' was set to '%s'",
key, value);
} else {
- resxml = eurephiaXML_ResultMsg(ctx, exmlERROR,
+ resxml = eurephiaXML_ResultMsg(ctx, exmlERROR, NULL,
"Failed to set the key '%s' to '%s'",
key, value);
}
@@ -223,15 +223,15 @@ xmlDoc *eDBadminConfiguration(eurephiaCTX *ctx, xmlDoc *cfgxml) {
}
if( config_delete(ctx, key) ) {
- resxml = eurephiaXML_ResultMsg(ctx, exmlRESULT,
+ resxml = eurephiaXML_ResultMsg(ctx, exmlRESULT, NULL,
"Configuration key '%s' was deleted", key);
} else {
- resxml = eurephiaXML_ResultMsg(ctx, exmlERROR,
+ resxml = eurephiaXML_ResultMsg(ctx, exmlERROR, NULL,
"Failed to delete the key '%s'", key);
}
return resxml;
}
// If not, it's an invalid input
- return eurephiaXML_ResultMsg(ctx, exmlERROR, "Unkown XML tag received");
+ return eurephiaXML_ResultMsg(ctx, exmlERROR, NULL, "Unkown XML tag received");
}