Changeset 9e83b15 for protocols/bee_user.c
- Timestamp:
- 2018-07-03T05:58:47Z (6 years ago)
- Branches:
- master
- Children:
- c17d0af
- Parents:
- 49ab3cb
- git-author:
- dequis <dx@…> (03-07-18 05:27:59)
- git-committer:
- dequis <dx@…> (03-07-18 05:58:47)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/bee_user.c
r49ab3cb r9e83b15 42 42 bee->users = g_slist_prepend(bee->users, bu); 43 43 44 if (ic->bee_users) { 45 g_hash_table_insert(ic->bee_users, bu->handle, bu); 46 } 44 47 if (bee->ui->user_new) { 45 48 bee->ui->user_new(bee, bu); … … 67 70 bu->ic->acc->prpl->buddy_data_free(bu); 68 71 } 69 72 if (bu->ic->bee_users) { 73 g_hash_table_remove(bu->ic->bee_users, bu->handle); 74 } 70 75 bee->users = g_slist_remove(bee->users, bu); 71 76 … … 80 85 } 81 86 82 bee_user_t *bee_user_by_handle (bee_t *bee, struct im_connection *ic, const char *handle)87 bee_user_t *bee_user_by_handle_slow(bee_t *bee, struct im_connection *ic, const char *handle) 83 88 { 84 89 GSList *l; … … 93 98 94 99 return NULL; 100 } 101 102 bee_user_t *bee_user_by_handle(bee_t *bee, struct im_connection *ic, const char *handle) 103 { 104 if (!ic->bee_users) { 105 return bee_user_by_handle_slow(bee, ic, handle); 106 } 107 108 return g_hash_table_lookup(ic->bee_users, handle); 95 109 } 96 110
Note: See TracChangeset
for help on using the changeset viewer.