Changeset e5abfd4 for protocols/oscar


Ignore:
Timestamp:
2010-05-09T11:26:57Z (15 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.