Changeset e5abfd4


Ignore:
Timestamp:
2010-05-09T11:26:57Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
47fae0f
Parents:
bd5eee3
Message:

Safety check for yesterday's fixes: Double-check that a groupchat struct
isn't claimed already.

Location:
protocols
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/sb.c

    rbd5eee3 re5abfd4  
    233233{
    234234        struct im_connection *ic = sb->ic;
     235        struct groupchat *c = NULL;
    235236        char buf[1024];
    236237       
     
    238239        g_snprintf( buf, sizeof( buf ), "MSN groupchat session %d", sb->session );
    239240        if( sb->who )
    240                 sb->chat = bee_chat_by_title( ic->bee, ic, sb->who );
    241         if( sb->chat == NULL )
     241                c = bee_chat_by_title( ic->bee, ic, sb->who );
     242        if( c && !msn_sb_by_chat( c ) )
     243                sb->chat = c;
     244        else
    242245                sb->chat = imcb_chat_new( ic, buf );
    243246       
  • protocols/oscar/oscar.c

    rbd5eee3 re5abfd4  
    787787        struct im_connection *ic = sess->aux_data;
    788788        struct chat_connection *chatcon;
     789        struct groupchat *c = NULL;
    789790        static int id = 1;
    790791
     
    799800        chatcon = find_oscar_chat_by_conn(ic, fr->conn);
    800801        chatcon->id = id;
    801         chatcon->cnv = bee_chat_by_title(ic->bee, ic, chatcon->show);
    802         if (chatcon->cnv == NULL)
     802       
     803        c = bee_chat_by_title(ic->bee, ic, chatcon->show);
     804        if (c && !c->data)
     805                chatcon->cnv = c;
     806        else
    803807                chatcon->cnv = imcb_chat_new(ic, chatcon->show);
    804808        chatcon->cnv->data = chatcon;
Note: See TracChangeset for help on using the changeset viewer.