libpurple/protocols/silc/buddy.c

branch
soc.2013.gobjectification.plugins
changeset 36593
8960ce807044
parent 36574
e9b59dd16117
parent 34897
a323e8b5a090
child 36701
5acd461707ae
equal deleted inserted replaced
36592:431166bcb802 36593:8960ce807044
78 return; 78 return;
79 79
80 switch (status) { 80 switch (status) {
81 case SILC_KEY_AGREEMENT_OK: 81 case SILC_KEY_AGREEMENT_OK:
82 { 82 {
83 PurpleConversation *convo; 83 PurpleIMConversation *im;
84 char tmp[128]; 84 char tmp[128];
85 85
86 /* Set the private key for this client */ 86 /* Set the private key for this client */
87 silc_client_del_private_message_key(client, conn, client_entry); 87 silc_client_del_private_message_key(client, conn, client_entry);
88 silc_client_add_private_message_key_ske(client, conn, client_entry, 88 silc_client_add_private_message_key_ske(client, conn, client_entry,
89 NULL, NULL, key); 89 NULL, NULL, key);
90 silc_ske_free_key_material(key); 90 silc_ske_free_key_material(key);
91 91
92 92
93 /* Open IM window */ 93 /* Open IM window */
94 convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, 94 im = purple_conversations_find_im_with_account(
95 client_entry->nickname, sg->account); 95 client_entry->nickname, sg->account);
96 if (convo) { 96 if (im) {
97 /* we don't have windows in the core anymore...but we may want to 97 /* we don't have windows in the core anymore...but we may want to
98 * provide some method for asking the UI to show the window 98 * provide some method for asking the UI to show the window
99 purple_conversation_window_show(purple_conversation_get_window(convo)); 99 purple_conversation_window_show(purple_conversation_get_window(im));
100 */ 100 */
101 } else { 101 } else {
102 convo = purple_im_conversation_new(sg->account, 102 im = purple_im_conversation_new(sg->account,
103 client_entry->nickname); 103 client_entry->nickname);
104 } 104 }
105 g_snprintf(tmp, sizeof(tmp), "%s [private key]", client_entry->nickname); 105 g_snprintf(tmp, sizeof(tmp), "%s [private key]", client_entry->nickname);
106 purple_conversation_set_title(convo, tmp); 106 purple_conversation_set_title(PURPLE_CONVERSATION(im), tmp);
107 } 107 }
108 break; 108 break;
109 109
110 case SILC_KEY_AGREEMENT_ERROR: 110 case SILC_KEY_AGREEMENT_ERROR:
111 purple_notify_error(gc, _("Key Agreement"), 111 purple_notify_error(gc, _("Key Agreement"),

mercurial