From 8e3890b12f48f4d4c2387cf9ac4cf3405bbf6615 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 24 Feb 2011 11:47:50 -0800 Subject: Fix memory corruption on Jabber disconnect with xmlconsole and handle_unknown=add enabled. --- protocols/bee_user.c | 2 +- protocols/jabber/io.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/bee_user.c b/protocols/bee_user.c index 0b118853..f0091799 100644 --- a/protocols/bee_user.c +++ b/protocols/bee_user.c @@ -250,7 +250,7 @@ void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, ui bu = bee_user_by_handle( bee, ic, handle ); - if( !bu ) + if( !bu && !( ic->flags & OPT_LOGGING_OUT ) ) { char *h = set_getstr( &bee->set, "handle_unknown" ); diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c index 9170f036..ef7d5c13 100644 --- a/protocols/jabber/io.c +++ b/protocols/jabber/io.c @@ -44,7 +44,7 @@ int jabber_write( struct im_connection *ic, char *buf, int len ) struct jabber_data *jd = ic->proto_data; gboolean ret; - if( jd->flags & JFLAG_XMLCONSOLE ) + if( jd->flags & JFLAG_XMLCONSOLE && !( ic->flags & OPT_LOGGING_OUT ) ) { char *msg, *s; -- cgit v1.2.3