diff options
author | James Booth <boothj5@gmail.com> | 2015-10-27 00:19:22 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-10-27 00:19:22 +0000 |
commit | 124aaa9809ee13b382f47f6f3e175bd7fdb98dc5 (patch) | |
tree | 8346aecaa20402dc9ac3c84b5fee8573d5341741 /src/otr/otr.c | |
parent | 8bd74cefcf73772a52b40c919a1e70da90be8a33 (diff) | |
download | profani-tty-124aaa9809ee13b382f47f6f3e175bd7fdb98dc5.tar.gz |
remaining otr functions take ProfChatWin
Diffstat (limited to 'src/otr/otr.c')
-rw-r--r-- | src/otr/otr.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/otr/otr.c b/src/otr/otr.c index 8d1ee545..bdecf22d 100644 --- a/src/otr/otr.c +++ b/src/otr/otr.c @@ -573,13 +573,18 @@ otr_smp_secret(const char *const recipient, const char *secret) } // if recipient initiated SMP, send response, else initialise + ProfChatWin *chatwin = wins_get_chat(recipient); if (g_hash_table_contains(smp_initiators, recipient)) { otrl_message_respond_smp(user_state, &ops, NULL, context, (const unsigned char*)secret, strlen(secret)); - ui_otr_authenticating(recipient); + if (chatwin) { + ui_otr_authenticating(chatwin); + } g_hash_table_remove(smp_initiators, context->username); } else { otrl_message_initiate_smp(user_state, &ops, NULL, context, (const unsigned char*)secret, strlen(secret)); - ui_otr_authetication_waiting(recipient); + if (chatwin) { + ui_otr_authetication_waiting(chatwin); + } } } @@ -597,7 +602,10 @@ otr_smp_question(const char *const recipient, const char *question, const char * } otrl_message_initiate_smp_q(user_state, &ops, NULL, context, question, (const unsigned char*)answer, strlen(answer)); - ui_otr_authetication_waiting(recipient); + ProfChatWin *chatwin = wins_get_chat(recipient); + if (chatwin) { + ui_otr_authetication_waiting(chatwin); + } } void |