Changeset 50ddfad


Ignore:
Timestamp:
2015-05-29T05:20:27Z (5 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
dcfa886
Parents:
b73409f
Message:

Better cleanup of chatrooms at logout time.

I forgot that the IM module is responsible for that. Which is not great, but
I'm not going to fix that now.. (nor probably ever)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/rpc/rpc.c

    rb73409f r50ddfad  
    297297}
    298298
     299static void rpc_groupchat_free(struct groupchat *gc);
     300
    299301static void rpc_logout(struct im_connection *ic) {
    300302        RPC_OUT_INIT("logout");
     
    303305
    304306        struct rpc_connection *rd = ic->proto_data;
     307
     308        GHashTableIter iter;
     309        struct rpc_groupchat *rc;
     310        g_hash_table_iter_init(&iter, rd->groupchats);
     311        while (g_hash_table_iter_next(&iter, NULL, (gpointer*)&rc)) {
     312                rpc_groupchat_free(rc->gc);
     313        }
     314
    305315        b_event_remove(ic->inpa);
    306316        closesocket(rd->fd);
     
    399409        json_array_append_integer(params, rc->id);
    400410        rpc_send(gc->ic, rpc);
     411        rpc_groupchat_free(gc);
    401412}
    402413
     
    425436
    426437        return rc;
     438}
     439
     440static void rpc_groupchat_free(struct groupchat *gc) {
     441        g_free(gc->data);
     442        imcb_chat_free(gc);
    427443}
    428444
Note: See TracChangeset for help on using the changeset viewer.