Mercurial > pidgin
changeset 7184:89dc8a119918
[gaim-migrate @ 7752]
gcc needs to stop letting me print NULL
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 07 Oct 2003 14:53:30 +0000 |
parents | 071dee25c48e |
children | 780604587f46 |
files | src/protocols/jabber/presence.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/jabber/presence.c Tue Oct 07 14:20:48 2003 +0000 +++ b/src/protocols/jabber/presence.c Tue Oct 07 14:53:30 2003 +0000 @@ -162,10 +162,12 @@ if(type && !strcasecmp(type, "error")) { state = JABBER_STATE_ERROR; if((y = xmlnode_get_child(packet, "error")) != NULL) { + /* XXX: need to handle new XMPP-style errors */ char *txt = xmlnode_get_data(y); jb->error_msg = g_strdup_printf(_("%s (Code %s)"), - txt, xmlnode_get_attrib(y, "code")); - g_free(txt); + txt ? txt : "Error", xmlnode_get_attrib(y, "code")); + if(txt) + g_free(txt); } else { jb->error_msg = g_strdup(_("Unknown Error in presence")); }