fix error code on xml_return_error

This commit is contained in:
Ron Pedde 2006-05-17 06:44:56 +00:00
parent 177a808624
commit cb9598608b
2 changed files with 3 additions and 2 deletions

View File

@ -116,6 +116,8 @@ static CONF_ELEMENTS conf_elements[] = {
{ 0, 0, CONF_T_STRING,"general","logfile" }, { 0, 0, CONF_T_STRING,"general","logfile" },
{ 0, 0, CONF_T_EXISTPATH,"plugins","plugin_dir" }, { 0, 0, CONF_T_EXISTPATH,"plugins","plugin_dir" },
{ 0, 0, CONF_T_MULTICOMMA,"plugins","plugins" }, { 0, 0, CONF_T_MULTICOMMA,"plugins","plugins" },
{ 0, 0, CONF_T_INT,"daap","empty_strings" },
{ 0, 0, CONF_T_INT,"daap","supports_browse" },
{ 0, 0, CONF_T_INT, NULL, NULL } { 0, 0, CONF_T_INT, NULL, NULL }
}; };

View File

@ -60,7 +60,7 @@ void xml_return_error(WS_CONNINFO *pwsc, int err, char *errstr) {
pxml=xml_init(pwsc,TRUE); pxml=xml_init(pwsc,TRUE);
xml_push(pxml,"results"); xml_push(pxml,"results");
xml_output(pxml,"status","%d",errno); xml_output(pxml,"status","%d",err);
xml_output(pxml,"statusstring","%s",errstr); xml_output(pxml,"statusstring","%s",errstr);
xml_pop(pxml); /* results */ xml_pop(pxml); /* results */
@ -157,7 +157,6 @@ void xml_set_config(WS_CONNINFO *pwsc) {
verify_only = 1; verify_only = 1;
} }
if((!section) || (!key) || (!value)) { if((!section) || (!key) || (!value)) {
xml_return_error(pwsc,500,"Missing section, key, or value"); xml_return_error(pwsc,500,"Missing section, key, or value");
return; return;