aboutsummaryrefslogtreecommitdiffstats
path: root/capplet/settings
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-03-17 03:06:34 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-04-07 19:01:06 +0800
commit8ca1c47874b85a1c7ee37427f3877fef37129e6a (patch)
tree08789a8f53ab7ba1063d757cc55b51772162acd4 /capplet/settings
parentced5bef58a54e80ea522ca05d50a7831c7baff12 (diff)
downloadgsoc2013-evolution-8ca1c47874b85a1c7ee37427f3877fef37129e6a.tar
gsoc2013-evolution-8ca1c47874b85a1c7ee37427f3877fef37129e6a.tar.gz
gsoc2013-evolution-8ca1c47874b85a1c7ee37427f3877fef37129e6a.tar.bz2
gsoc2013-evolution-8ca1c47874b85a1c7ee37427f3877fef37129e6a.tar.lz
gsoc2013-evolution-8ca1c47874b85a1c7ee37427f3877fef37129e6a.tar.xz
gsoc2013-evolution-8ca1c47874b85a1c7ee37427f3877fef37129e6a.tar.zst
gsoc2013-evolution-8ca1c47874b85a1c7ee37427f3877fef37129e6a.zip
Factor out function to parse a soup message from a string
We'll need this when we want to parse a pre-cached file for the account configuration guesser. Signed-off-by: Federico Mena Quintero <federico@novell.com> Conflicts: capplet/settings/mail-guess-servers.c
Diffstat (limited to 'capplet/settings')
-rw-r--r--capplet/settings/mail-guess-servers.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c
index 388f894e72..bb5f15d293 100644
--- a/capplet/settings/mail-guess-servers.c
+++ b/capplet/settings/mail-guess-servers.c
@@ -159,12 +159,12 @@ handle_outgoing (xmlNodePtr head, EmailProvider *provider)
}
static void
-parse_msg (SoupMessage *msg, EmailProvider *provider)
+parse_message (const char *msg, int length, EmailProvider *provider)
{
xmlDocPtr doc;
xmlNodePtr node, top;
- doc = xmlReadMemory (msg->response_body->data, msg->response_body->length, "file.xml", NULL, 0);
+ doc = xmlReadMemory (msg, length, "file.xml", NULL, 0);
node = doc->children;
while (node) {
@@ -209,6 +209,12 @@ parse_msg (SoupMessage *msg, EmailProvider *provider)
xmlFreeDoc(doc);
}
+static gboolean
+parse_soup_message (SoupMessage *msg, EmailProvider *provider)
+{
+ parse_message (msg->response_body->data, msg->response_body->length, provider);
+}
+
gboolean
mail_guess_servers(EmailProvider *provider)
{