]> sjero.net Git - linphone/commitdiff
Display authentication code in display status.
authorGuillaume Beraudo <guillaume.beraudo@belledonne-communications.com>
Mon, 22 Aug 2011 08:36:57 +0000 (10:36 +0200)
committerGuillaume Beraudo <guillaume.beraudo@belledonne-communications.com>
Mon, 22 Aug 2011 08:36:57 +0000 (10:36 +0200)
coreapi/linphonecall.c

index ee69c93dc6549fdaa561d9f44d039c2255f33bea..393d43d8fae9aa81dfcc36e058e2efec58dc24c9 100644 (file)
@@ -103,10 +103,17 @@ static void linphone_call_videostream_encryption_changed(void *data, bool_t encr
 #endif
 
 static void linphone_call_audiostream_encryption_changed(void *data, bool_t encrypted) {
+       char status[255]={0};
        ms_message("Audio stream is %s ", encrypted ? "encrypted" : "not encrypted");
 
        LinphoneCall *call = (LinphoneCall *)data;
        call->audiostream_encrypted=encrypted;
+
+       if (encrypted && call->core->vtable.display_status != NULL) {
+               snprintf(status,sizeof(status)-1,_("Authentication token is %s"),call->auth_token);
+                call->core->vtable.display_status(call->core, status);
+       }
+
        propagate_encryption_changed(call);