summaryrefslogtreecommitdiff
path: root/libpurple/account.c
diff options
context:
space:
mode:
authorDaniel Atallah <datallah@pidgin.im>2009-01-20 04:08:00 +0000
committerDaniel Atallah <datallah@pidgin.im>2009-01-20 04:08:00 +0000
commit186652cb24849fa505b0368a0b7312e362260446 (patch)
treecc73d869e5c68eb0c1c5da2b70ea1639480ea2ec /libpurple/account.c
parent0d845a8fa4fe4c4cf0650f92110bad892f1c49ae (diff)
downloadpidgin-186652cb24849fa505b0368a0b7312e362260446.tar.gz
Thomas Gibson-Robinson noticed that the "saveable" attribute of a status type
didn't actually do anything (and consequently "non-saveable" status types were being saved). A side effect of fixing this is that we have to change the behavior of purple_status_type_new() to default "saveable" to TRUE in order to maintain the current behavior. Fixes #8162
Diffstat (limited to 'libpurple/account.c')
-rw-r--r--libpurple/account.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libpurple/account.c b/libpurple/account.c
index b25e0be8d2..eaf70344b4 100644
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -257,15 +257,20 @@ static xmlnode *
statuses_to_xmlnode(const PurplePresence *presence)
{
xmlnode *node, *child;
- GList *statuses, *status;
+ GList *statuses;
+ PurpleStatus *status;
node = xmlnode_new("statuses");
statuses = purple_presence_get_statuses(presence);
- for (status = statuses; status != NULL; status = status->next)
+ for (; statuses != NULL; statuses = statuses->next)
{
- child = status_to_xmlnode((PurpleStatus *)status->data);
- xmlnode_insert_child(node, child);
+ status = statuses->data;
+ if (purple_status_type_is_saveable(purple_status_get_type(status)))
+ {
+ child = status_to_xmlnode(status);
+ xmlnode_insert_child(node, child);
+ }
}
return node;