aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-03-17 03:08:33 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-04-07 19:01:13 +0800
commit2e5b6ea7a491c1f236aac3a75c3bac5493e890dd (patch)
treec30664156f33f72fde12b396efdffda69a820e1a
parent8ca1c47874b85a1c7ee37427f3877fef37129e6a (diff)
downloadgsoc2013-evolution-2e5b6ea7a491c1f236aac3a75c3bac5493e890dd.tar
gsoc2013-evolution-2e5b6ea7a491c1f236aac3a75c3bac5493e890dd.tar.gz
gsoc2013-evolution-2e5b6ea7a491c1f236aac3a75c3bac5493e890dd.tar.bz2
gsoc2013-evolution-2e5b6ea7a491c1f236aac3a75c3bac5493e890dd.tar.lz
gsoc2013-evolution-2e5b6ea7a491c1f236aac3a75c3bac5493e890dd.tar.xz
gsoc2013-evolution-2e5b6ea7a491c1f236aac3a75c3bac5493e890dd.tar.zst
gsoc2013-evolution-2e5b6ea7a491c1f236aac3a75c3bac5493e890dd.zip
Return a success code when parsing a message
The child functions of parse_message() do not yet return error values, but this will make it easier to do something with them in the future if they get added. Signed-off-by: Federico Mena Quintero <federico@novell.com>
-rw-r--r--capplet/settings/mail-guess-servers.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c
index bb5f15d293..aa5ebd7de4 100644
--- a/capplet/settings/mail-guess-servers.c
+++ b/capplet/settings/mail-guess-servers.c
@@ -158,7 +158,7 @@ handle_outgoing (xmlNodePtr head, EmailProvider *provider)
}
}
-static void
+static gboolean
parse_message (const char *msg, int length, EmailProvider *provider)
{
xmlDocPtr doc;
@@ -176,7 +176,7 @@ parse_message (const char *msg, int length, EmailProvider *provider)
if (!node) {
g_warning ("Incorrect data: ClientConfig not found ... Quitting\n");
- return;
+ return FALSE;
}
node = node->children;
@@ -189,7 +189,7 @@ parse_message (const char *msg, int length, EmailProvider *provider)
if (!node) {
g_warning ("Incorrect data: ClientConfig not found ... Quitting\n");
- return;
+ return FALSE;
}
top = node;
@@ -207,12 +207,14 @@ parse_message (const char *msg, int length, EmailProvider *provider)
}
xmlFreeDoc(doc);
+
+ return TRUE;
}
static gboolean
parse_soup_message (SoupMessage *msg, EmailProvider *provider)
{
- parse_message (msg->response_body->data, msg->response_body->length, provider);
+ return parse_message (msg->response_body->data, msg->response_body->length, provider);
}
gboolean