From 0ce5a5f7dfa9b5ca053bdf210f8ed60d4d46e518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Thu, 19 Mar 2015 14:01:23 +0100 Subject: [PATCH] Add a config parameter to avoid linphone to save authentication data --- coreapi/authentication.c | 4 ++-- coreapi/linphonecore.c | 1 + coreapi/private.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/coreapi/authentication.c b/coreapi/authentication.c index 0306803f8..f0f5eec2e 100644 --- a/coreapi/authentication.c +++ b/coreapi/authentication.c @@ -353,7 +353,7 @@ void linphone_core_add_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info) info->domain ? info->domain : ""); } ms_list_free(l); - write_auth_infos(lc); + if(lc->sip_conf.save_auth_info) write_auth_infos(lc); } @@ -373,7 +373,7 @@ void linphone_core_remove_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *in if (r){ lc->auth_info=ms_list_remove(lc->auth_info,r); linphone_auth_info_destroy(r); - write_auth_infos(lc); + if(lc->sip_conf.save_auth_info) write_auth_infos(lc); } } diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index c56dbe02c..c22229cd8 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -961,6 +961,7 @@ static void sip_config_read(LinphoneCore *lc) lc->sip_conf.vfu_with_info=lp_config_get_int(lc->config,"sip","vfu_with_info",1); linphone_core_set_sip_transport_timeout(lc, lp_config_get_int(lc->config, "sip", "transport_timeout", 63000)); sal_set_supported_tags(lc->sal,lp_config_get_string(lc->config,"sip","supported","replaces, outbound")); + lc->sip_conf.save_auth_info = lp_config_get_int(lc->config, "sip", "save_auth_info", 1); } static void rtp_config_read(LinphoneCore *lc) diff --git a/coreapi/private.h b/coreapi/private.h index 27ad33d52..4dea61ebb 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -583,6 +583,7 @@ typedef struct sip_config bool_t auto_net_state_mon; bool_t tcp_tls_keepalive; bool_t vfu_with_info; /*use to enable vfu request using sip info*/ + bool_t save_auth_info; // if true, auth infos will be write in the config file when they are added to the list } sip_config_t; typedef struct rtp_config