soc.2008.masterpassword: 07f2279a: Fixed account_toxmlnode() so that xmlnod...
scrouaf at soc.pidgin.im
scrouaf at soc.pidgin.im
Wed Aug 27 06:05:42 EDT 2008
-----------------------------------------------------------------
Revision: 07f2279a36efb1d632cb3540467da273c32d9290
Ancestor: 07f36cf3129d0994cc6af8789efe06805f3ff344
Author: scrouaf at soc.pidgin.im
Date: 2008-08-27T09:52:21
Branch: im.pidgin.soc.2008.masterpassword
URL: http://d.pidgin.im/viewmtn/revision/info/07f2279a36efb1d632cb3540467da273c32d9290
Modified files:
libpurple/account.c
ChangeLog:
Fixed account_toxmlnode() so that xmlnode funcctions are not called if we have nothing to put in them.
-------------- next part --------------
============================================================
--- libpurple/account.c 073b528efa4d6a188e8ae0d11ffecd686f47f145
+++ libpurple/account.c 453a8543ea287d11f7c06f7c69e2f35219f6991c
@@ -415,9 +415,12 @@ account_to_xmlnode(PurpleAccount *accoun
} else {
child = xmlnode_new_child(node, "password");
- xmlnode_set_attrib(child, "keyring_id", keyring_id);
- xmlnode_set_attrib(child, "mode", mode);
- xmlnode_insert_data(child, data, -1);
+ if (keyring_id != NULL)
+ xmlnode_set_attrib(child, "keyring_id", keyring_id);
+ if (mode != NULL)
+ xmlnode_set_attrib(child, "mode", mode);
+ if (data != NULL)
+ xmlnode_insert_data(child, data, -1);
if (destroy != NULL)
destroy(data);
More information about the Commits
mailing list