aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/conference.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-01-13 17:13:45 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2008-01-13 17:13:45 +0000
commit13857c648210a16448619c65e33f9918bfe27cbe (patch)
tree3d0b6fcb9fce069cb96cec8225327c7cca5d1326 /protocols/jabber/conference.c
parentdded27d9a58237036b23f152eb6dfeaad3ae762d (diff)
Fixed handing of failed groupchat joins.
Diffstat (limited to 'protocols/jabber/conference.c')
-rw-r--r--protocols/jabber/conference.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c
index 074412ec..466cb323 100644
--- a/protocols/jabber/conference.c
+++ b/protocols/jabber/conference.c
@@ -72,17 +72,16 @@ static xt_status jabber_chat_join_failed( struct im_connection *ic, struct xt_no
char *room;
room = xt_find_attr( orig, "to" );
- if( ( bud = jabber_buddy_by_jid( ic, room, 0 ) ) )
- jabber_chat_free( jabber_chat_by_jid( ic, bud->bare_jid ) );
-
+ bud = jabber_buddy_by_jid( ic, room, 0 );
err = jabber_error_parse( xt_find_node( node->children, "error" ), XMLNS_STANZA_ERROR );
if( err )
{
- imcb_error( ic, "Error joining groupchat %s: %s%s%s",
- bud->bare_jid, err->code, err->text ? ": " : "",
- err->text ? err->text : "" );
+ imcb_error( ic, "Error joining groupchat %s: %s%s%s", room, err->code,
+ err->text ? ": " : "", err->text ? err->text : "" );
jabber_error_free( err );
}
+ if( bud )
+ jabber_chat_free( jabber_chat_by_jid( ic, bud->bare_jid ) );
return XT_HANDLED;
}