Mercurial > pidgin
changeset 23700:187b0e2ff49d
Rely on xmlnode_insert_data to call strlen on a bunch of MSN status strings.
This has the side-effect of not triggering g_return_if_fail(length != 0) in
xmlnode_insert_data when you update your buddy icon and don't have a status
message, in which case msn_build_psm used to call insert_data("", 0). Perhaps
xmlnode_insert_data should short-circuit without logging an error if length ==
0?
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Mon, 11 Aug 2008 11:58:12 +0000 |
parents | 80ce5ca985c2 |
children | c004957c7e4c |
files | libpurple/protocols/msn/state.c |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/state.c Sun Aug 10 21:49:23 2008 +0000 +++ b/libpurple/protocols/msn/state.c Mon Aug 11 11:58:12 2008 +0000 @@ -61,23 +61,23 @@ psmNode = xmlnode_new("PSM"); if(psmstr != NULL){ - xmlnode_insert_data(psmNode,psmstr,strlen(psmstr)); + xmlnode_insert_data(psmNode, psmstr, -1); } - xmlnode_insert_child(dataNode,psmNode); + xmlnode_insert_child(dataNode, psmNode); mediaNode = xmlnode_new("CurrentMedia"); if(mediastr != NULL){ - xmlnode_insert_data(mediaNode,mediastr,strlen(mediastr)); + xmlnode_insert_data(mediaNode, mediastr, -1); } - xmlnode_insert_child(dataNode,mediaNode); + xmlnode_insert_child(dataNode, mediaNode); guidNode = xmlnode_new("MachineGuid"); if(guidstr != NULL){ - xmlnode_insert_data(guidNode,guidstr,strlen(guidstr)); + xmlnode_insert_data(guidNode, guidstr, -1); } - xmlnode_insert_child(dataNode,guidNode); + xmlnode_insert_child(dataNode, guidNode); - result = xmlnode_to_str(dataNode,&length); + result = xmlnode_to_str(dataNode, &length); xmlnode_free(dataNode); return result; }