comparison libpurple/protocols/oscar/oscar.c @ 18814:f4d67b36f0c1

Use g_slist_find_custom() instead of writing one ourselves
author Mark Doliner <mark@kingant.net>
date Mon, 06 Aug 2007 06:30:25 +0000
parents 1abc28b51b0c
children 7a27e3729612
comparison
equal deleted inserted replaced
18813:1abc28b51b0c 18814:f4d67b36f0c1
1871 b = purple_find_buddy(account, info->sn); 1871 b = purple_find_buddy(account, info->sn);
1872 if (b != NULL) 1872 if (b != NULL)
1873 saved_b16 = purple_buddy_icons_get_checksum_for_user(b); 1873 saved_b16 = purple_buddy_icons_get_checksum_for_user(b);
1874 1874
1875 if (!b16 || !saved_b16 || strcmp(b16, saved_b16)) { 1875 if (!b16 || !saved_b16 || strcmp(b16, saved_b16)) {
1876 GSList *cur = od->requesticon; 1876 if (g_slist_find_custom(od->requesticon, info->sn,
1877 while (cur && aim_sncmp((char *)cur->data, info->sn)) 1877 (GCompareFunc)aim_sncmp) == NULL)
1878 cur = cur->next; 1878 {
1879 if (!cur) {
1880 od->requesticon = g_slist_append(od->requesticon, g_strdup(purple_normalize(account, info->sn))); 1879 od->requesticon = g_slist_append(od->requesticon, g_strdup(purple_normalize(account, info->sn)));
1881 if (od->icontimer == 0) 1880 if (od->icontimer == 0)
1882 od->icontimer = purple_timeout_add(1, purple_icon_timerfunc, gc); 1881 od->icontimer = purple_timeout_add(1, purple_icon_timerfunc, gc);
1883 } 1882 }
1884 } 1883 }