changeset 11075:812b285aeccd

[gaim-migrate @ 13085] sf patch #1233654, from Sadrul H C There was an error in the parsing of the status. ("active" and "type" are attributes of a status, rather than children). That is fixed with this patch. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 09 Jul 2005 19:36:24 +0000
parents ba630d7a7365
children 75be3005640e
files src/account.c
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/account.c	Sat Jul 09 19:26:49 2005 +0000
+++ b/src/account.c	Sat Jul 09 19:36:24 2005 +0000
@@ -404,11 +404,10 @@
 	gboolean active = FALSE;
 	const char *data;
 	const char *type;
-	xmlnode *child;
 
 	/* Get the active/inactive state */
-	child = xmlnode_get_child(node, "active");
-	if ((child != NULL) && ((data = xmlnode_get_data(child)) != NULL))
+	data = xmlnode_get_attrib(node, "active");
+	if (data != NULL)
 	{
 		if (strcasecmp(data, "true") == 0)
 			active = TRUE;
@@ -421,12 +420,8 @@
 		return;
 
 	/* Get the type of the status */
-	child = xmlnode_get_child(node, "type");
-	if ((child != NULL) && ((data = xmlnode_get_data(child)) != NULL))
-	{
-		type = data;
-	}
-	else
+	type = xmlnode_get_attrib(node, "type");
+	if (type == NULL)
 		return;
 
 	/* QQQ: Need to read attributes into a vargs */