From 6f1dffe83a875e5aaded0cedd8a3dc9dcee6a0d2 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Thu, 17 Nov 2011 12:44:50 +0100 Subject: [PATCH] Zrtp reset verified command. --- console/commands.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/console/commands.c b/console/commands.c index e40dda66c..bccb09c81 100644 --- a/console/commands.c +++ b/console/commands.c @@ -104,6 +104,7 @@ static int lpc_cmd_identify(LinphoneCore *lc, char *args); static int lpc_cmd_ringback(LinphoneCore *lc, char *args); static int lpc_cmd_conference(LinphoneCore *lc, char *args); static int lpc_cmd_zrtp_verified(LinphoneCore *lc, char *args); +static int lpc_cmd_zrtp_unverified(LinphoneCore *lc, char *args); /* Command handler helpers */ static void linphonec_proxy_add(LinphoneCore *lc); @@ -352,6 +353,9 @@ static LPC_COMMAND advanced_commands[] = { { "zrtp-set-verified", lpc_cmd_zrtp_verified,"Set ZRTP SAS verified.", "'Set ZRTP SAS verified'\n" }, + { "zrtp-set-unverified", lpc_cmd_zrtp_unverified,"Set ZRTP SAS not verified.", + "'Set ZRTP SAS not verified'\n" + }, { NULL,NULL,NULL,NULL} }; @@ -2556,13 +2560,19 @@ static int lpc_cmd_ringback(LinphoneCore *lc, char *args){ return 1; } -static int lpc_cmd_zrtp_verified(LinphoneCore *lc, char *args){ +static int zrtp_set_verified(LinphoneCore *lc, char *args, bool_t verified){ LinphoneCall *call=linphone_core_get_current_call(lc); if (linphone_call_params_get_media_encryption(linphone_call_get_current_params(call))==LinphoneMediaEncryptionZRTP){ - linphone_call_set_authentication_token_verified(call,TRUE); + linphone_call_set_authentication_token_verified(call,verified); } return 1; } +static int lpc_cmd_zrtp_verified(LinphoneCore *lc, char *args){ + return zrtp_set_verified(lc,args,TRUE); +} +static int lpc_cmd_zrtp_unverified(LinphoneCore *lc, char *args){ + return zrtp_set_verified(lc,args,FALSE); +} /*************************************************************************** *