about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-10-26 23:50:56 +0000
committerJames Booth <boothj5@gmail.com>2015-10-26 23:50:56 +0000
commit8bd74cefcf73772a52b40c919a1e70da90be8a33 (patch)
tree225fc4829a86c8ef951ee330286b3ebde8800039 /src/ui
parent3cea2bc4f4ae6d57cf4cdead868c1e02311aca40 (diff)
downloadprofani-tty-8bd74cefcf73772a52b40c919a1e70da90be8a33.tar.gz
ui_smp_successful takes ProfChatWin
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/chatwin.c9
-rw-r--r--src/ui/ui.h2
2 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c
index a5b2a9be..5c8dbca6 100644
--- a/src/ui/chatwin.c
+++ b/src/ui/chatwin.c
@@ -148,12 +148,11 @@ ui_smp_aborted(ProfChatWin *chatwin)
 }
 
 void
-ui_smp_successful(const char *const barejid)
+ui_smp_successful(ProfChatWin *chatwin)
 {
-    ProfChatWin *chatwin = wins_get_chat(barejid);
-    if (chatwin) {
-        win_print((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "Authentication successful.");
-    }
+    assert(chatwin != NULL);
+
+    win_print((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "Authentication successful.");
 }
 
 void
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 11b0f9c6..d497ea00 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -69,7 +69,7 @@ void ui_untrust(const char *const barejid);
 void ui_smp_recipient_initiated(ProfChatWin *chatwin);
 void ui_smp_recipient_initiated_q(ProfChatWin *chatwin, const char *question);
 
-void ui_smp_successful(const char *const barejid);
+void ui_smp_successful(ProfChatWin *chatwin);
 void ui_smp_unsuccessful_sender(ProfChatWin *chatwin);
 void ui_smp_unsuccessful_receiver(ProfChatWin *chatwin);
 void ui_smp_aborted(ProfChatWin *chatwin);