Changeset 8c3637b for protocols/nogaim.c
- Timestamp:
- 2015-05-24T19:43:09Z (9 years ago)
- Children:
- a852b2b
- Parents:
- 93e0901
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r93e0901 r8c3637b 312 312 } 313 313 314 if (ic->acc->flags & ACC_FLAG_LOCAL_CONTACTS) { 314 if ((ic->acc->flags & ACC_FLAG_LOCAL_CONTACTS) && 315 !(ic->flags & OPT_LOCAL_CONTACTS_SENT)) { 315 316 GHashTableIter nicks; 316 gpointer k, v;317 gpointer handle; 317 318 g_hash_table_iter_init(&nicks, ic->acc->nicks); 318 while (g_hash_table_iter_next(&nicks, & k, &v)) {319 ic->acc->prpl->add_buddy(ic, (char *) k, NULL);319 while (g_hash_table_iter_next(&nicks, &handle, NULL)) { 320 ic->acc->prpl->add_buddy(ic, (char *) handle, NULL); 320 321 } 321 322 } … … 495 496 bee->ui->user_nick_hint(bee, bu, nick); 496 497 } 498 } 499 500 /* Returns the local contacts for an IM account (based on assigned nicks). 501 Linked list should be freed, the strings themselves not! So look at it 502 like a GSList<const char*> I guess? Empty list means NULL retval (as 503 always with GSList). */ 504 GSList *imcb_get_local_contacts(struct im_connection *ic) 505 { 506 GHashTableIter nicks; 507 GSList *ret = NULL; 508 509 g_hash_table_iter_init(&nicks, ic->acc->nicks); 510 gpointer handle; 511 while (g_hash_table_iter_next(&nicks, &handle, NULL)) { 512 ret = g_slist_prepend(ret, (char *) handle); 513 } 514 515 /* If the protocol asked for the list, assume we won't have to send it 516 anymore in imcb_connected(). */ 517 ic->flags |= OPT_LOCAL_CONTACTS_SENT; 518 519 return ret; 497 520 } 498 521
Note: See TracChangeset
for help on using the changeset viewer.