Changeset 6e991a9


Ignore:
Timestamp:
2016-10-16T06:51:53Z (7 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
2906268
Parents:
a08b2db
git-author:
dequis <dx@…> (16-10-16 06:50:49)
git-committer:
dequis <dx@…> (16-10-16 06:51:53)
Message:

Turn purple_chatlist_free() into a imcb_chat_list_free()

I found myself copypasting this to jabber. Might as well make it part of
the API.

Location:
protocols
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/bee.h

    ra08b2db r6e991a9  
    192192G_GNUC_DEPRECATED G_MODULE_EXPORT void bee_chat_list_finish(struct im_connection *ic);
    193193G_MODULE_EXPORT void imcb_chat_list_finish(struct im_connection *ic);
     194G_MODULE_EXPORT void imcb_chat_list_free(struct im_connection *ic);
    194195
    195196#endif /* __BEE_H__ */
  • protocols/bee_chat.c

    ra08b2db r6e991a9  
    285285        imcb_chat_list_finish(ic);
    286286}
     287
     288void imcb_chat_list_free(struct im_connection *ic)
     289{
     290        bee_chat_info_t *ci;
     291        GSList *l = ic->chatlist;
     292
     293        while (l) {
     294                ci = l->data;
     295                l = g_slist_delete_link(l, l);
     296
     297                g_free(ci->title);
     298                g_free(ci->topic);
     299                g_free(ci);
     300        }
     301
     302        ic->chatlist = NULL;
     303}
  • protocols/purple/purple.c

    ra08b2db r6e991a9  
    361361}
    362362
    363 static void purple_chatlist_free(struct im_connection *ic)
    364 {
    365         bee_chat_info_t *ci;
    366         GSList *l = ic->chatlist;
    367 
    368         while (l) {
    369                 ci = l->data;
    370                 l = g_slist_delete_link(l, l);
    371 
    372                 g_free(ci->title);
    373                 g_free(ci->topic);
    374                 g_free(ci);
    375         }
    376 }
    377 
    378363static void purple_logout(struct im_connection *ic)
    379364{
     
    391376        purple_connections = g_slist_remove(purple_connections, ic);
    392377        purple_accounts_remove(pd->account);
    393         purple_chatlist_free(ic);
     378        imcb_chat_list_free(ic);
    394379        g_hash_table_destroy(pd->input_requests);
    395380        g_free(pd);
     
    14021387
    14031388        ic = purple_ic_by_pa(list->account);
    1404         purple_chatlist_free(ic);
     1389        imcb_chat_list_free(ic);
    14051390
    14061391        ic->chatlist = g_slist_reverse(rld->chats);
Note: See TracChangeset for help on using the changeset viewer.