about summary refs log tree commit diff stats
path: root/src/otr/otrlibv4.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-10-27 22:25:02 +0000
committerJames Booth <boothj5@gmail.com>2015-10-27 22:25:26 +0000
commitff9abecd509f3a1d1f857a736dda28da9e94ad69 (patch)
tree8c64e07941789b2aa5dcebcc13908af3531cbb36 /src/otr/otrlibv4.c
parent40dcd597270c375ff2d0abc36554f6436f406a03 (diff)
downloadprofani-tty-ff9abecd509f3a1d1f857a736dda28da9e94ad69.tar.gz
Combined chatwin OTR SMP functions
Diffstat (limited to 'src/otr/otrlibv4.c')
-rw-r--r--src/otr/otrlibv4.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/otr/otrlibv4.c b/src/otr/otrlibv4.c
index cdfef5dd..548d2232 100644
--- a/src/otr/otrlibv4.c
+++ b/src/otr/otrlibv4.c
@@ -183,24 +183,24 @@ cb_handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
     {
         case OTRL_SMPEVENT_ASK_FOR_SECRET:
             if (chatwin) {
-                chatwin_otr_smp_init(chatwin);
+                chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_INIT, NULL);
             }
             g_hash_table_insert(smp_initiators, strdup(context->username), strdup(context->username));
             break;
 
         case OTRL_SMPEVENT_ASK_FOR_ANSWER:
             if (chatwin) {
-                chatwin_otr_smp_init_q(chatwin, question);
+                chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_INIT_Q, question);
             }
             break;
 
         case OTRL_SMPEVENT_SUCCESS:
             if (chatwin) {
                 if (context->smstate->received_question == 0) {
-                    chatwin_otr_smp_success(chatwin);
+                    chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_SUCCESS, NULL);
                     chatwin_otr_trust(chatwin);
                 } else {
-                    chatwin_otr_smp_answer_success(chatwin);
+                    chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_SUCCESS_Q, NULL);
                 }
             }
             break;
@@ -209,13 +209,13 @@ cb_handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
             if (chatwin) {
                 if (context->smstate->received_question == 0) {
                     if (nextMsg == OTRL_SMP_EXPECT3) {
-                        chatwin_otr_smp_sender_failed(chatwin);
+                        chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_SENDER_FAIL, NULL);
                     } else if (nextMsg == OTRL_SMP_EXPECT4) {
-                        chatwin_otr_smp_receiver_failed(chatwin);
+                        chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_RECEIVER_FAIL, NULL);
                     }
                     chatwin_otr_untrust(chatwin);
                 } else {
-                    chatwin_otr_smp_answer_failure(chatwin);
+                    chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_FAIL_Q, NULL);
                 }
             }
             break;
@@ -230,7 +230,7 @@ cb_handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
 
         case OTRL_SMPEVENT_ABORT:
             if (chatwin) {
-                chatwin_otr_smp_aborted(chatwin);
+                chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_ABORT, NULL);
                 chatwin_otr_untrust(chatwin);
             }
             break;