diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-09-28 01:18:21 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-09-28 01:18:21 +0100 |
commit | 2bebe15b447b84fd5705a021f73db609c336fd73 (patch) | |
tree | e4166eb04c60e0f9b8de20b63890707f4a782e85 | |
parent | ced1e17474366772791186f865bd45d4decfcaf2 (diff) |
Fixed one crash bug in Yahoo! chatroom invitation handling.
-rw-r--r-- | protocols/yahoo/yahoo.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 8d9e95d8..fa36de39 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -789,9 +789,22 @@ int ext_yahoo_connect(const char *host, int port) static void byahoo_accept_conf( void *data ) { struct byahoo_conf_invitation *inv = data; + struct groupchat *b; + + for( b = inv->ic->groupchats; b; b = b->next ) + if( b == inv->c ) + break; + + if( b != NULL ) + { + yahoo_conference_logon( inv->yid, NULL, inv->members, inv->name ); + imcb_chat_add_buddy( inv->c, inv->ic->acc->user ); + } + else + { + imcb_log( inv->ic, "Duplicate/corrupted invitation to `%s'.", inv->name ); + } - yahoo_conference_logon( inv->yid, NULL, inv->members, inv->name ); - imcb_chat_add_buddy( inv->c, inv->ic->acc->user ); g_free( inv->name ); g_free( inv ); } |