~vish/ubuntu/maverick/pidgin/bug25979

« back to all changes in this revision

Viewing changes to libpurple/protocols/silc/ops.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-10-09 19:40:26 UTC
  • mfrom: (1.4.1 upstream) (46.1.10 karmic)
  • Revision ID: james.westby@ubuntu.com-20091009194026-wbqqh0bsbz19nx5q
Tags: 1:2.6.2-1ubuntu7
* Don't stick the buddy list window to all desktops as some
  window managers have trouble to properly unstick it (LP: #346840)
  - debian/patches/11_buddy_list_really_show.patch
* Always use default tray icon size on KDE (LP: #209440)
  - debian/patches/62_tray_icon_size_kde.patch
* Use scrollbars in the preferences dialog if the screen height is
  below 700 px instead of 600 px
  - debian/patches/60_1024x600_gtkprefs.c.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
                gc = client->application;
72
72
 
73
73
        if (gc != NULL)
74
 
                purple_connection_error_reason (gc, reason, tmp);
 
74
                purple_connection_error_reason(gc, reason, tmp);
75
75
        else
76
76
                purple_notify_error(NULL, _("Error"), _("Error occurred"), tmp);
77
77
}
431
431
        va_list va;
432
432
        PurpleConnection *gc = client->application;
433
433
        SilcPurple sg = gc->proto_data;
 
434
        PurpleAccount *account = purple_connection_get_account(gc);
434
435
        PurpleConversation *convo;
435
436
        SilcClientEntry client_entry, client_entry2;
436
437
        SilcChannelEntry channel;
838
839
 
839
840
                        b = NULL;
840
841
                        if (public_key) {
841
 
                                PurpleBlistNode *gnode, *cnode, *bnode;
 
842
                                GSList *buddies;
842
843
                                const char *f;
843
844
 
844
845
                                pk = silc_pkcs_public_key_encode(public_key, &pk_len);
856
857
                                silc_free(pk);
857
858
 
858
859
                                /* Find buddy by associated public key */
859
 
                                for (gnode = purple_get_blist()->root; gnode;
860
 
                                     gnode = gnode->next) {
861
 
                                        if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
862
 
                                                continue;
863
 
                                        for (cnode = gnode->child; cnode; cnode = cnode->next) {
864
 
                                                if( !PURPLE_BLIST_NODE_IS_CONTACT(cnode))
865
 
                                                        continue;
866
 
                                                for (bnode = cnode->child; bnode;
867
 
                                                     bnode = bnode->next) {
868
 
                                                        if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
869
 
                                                                continue;
870
 
                                                        b = (PurpleBuddy *)bnode;
871
 
                                                        if (b->account != gc->account)
872
 
                                                                continue;
873
 
                                                        f = purple_blist_node_get_string(bnode, "public-key");
874
 
                                                        if (f && !strcmp(f, buf))
875
 
                                                                goto cont;
876
 
                                                        b = NULL;
877
 
                                                }
878
 
                                        }
 
860
                                for (buddies = purple_find_buddies(account, NULL); buddies;
 
861
                                                buddies = g_slist_delete_link(buddies, buddies)) {
 
862
                                        b = buddies->data;
 
863
                                        f = purple_blist_node_get_string(PURPLE_BLIST_NODE(b), "public-key");
 
864
                                        if (purple_strequal(f, buf))
 
865
                                                goto cont;
 
866
                                        b = NULL;
879
867
                                }
880
868
                        }
881
869
                cont:
889
877
                                }
890
878
                        }
891
879
 
892
 
                        silc_free(b->proto_data);
893
 
                        b->proto_data = silc_memdup(&client_entry->id,
894
 
                                                    sizeof(client_entry->id));
 
880
                        silc_free(purple_buddy_get_protocol_data(b));
 
881
                        purple_buddy_set_protocol_data(b, silc_memdup(&client_entry->id,
 
882
                                                    sizeof(client_entry->id)));
895
883
                        if (notify == SILC_NOTIFY_TYPE_NICK_CHANGE) {
896
884
                                break;
897
885
                        } else if (notify == SILC_NOTIFY_TYPE_UMODE_CHANGE) {