From 4a6066cd51a228720f8ba44759468e6ba582b858 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini <sylvain.berfini@belledonne-communications.com> Date: Mon, 5 Jun 2023 11:45:24 +0200 Subject: [PATCH] Fixed AccountParams::setOutboundProxyEnabled(false) not saved to config file --- src/account/account-params.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/account/account-params.cpp b/src/account/account-params.cpp index b8a2bc7ce7..4a1d8d4a76 100644 --- a/src/account/account-params.cpp +++ b/src/account/account-params.cpp @@ -376,6 +376,8 @@ void AccountParams::setOutboundProxyEnabled(bool enable) { } mRoutes.emplace_back(mProxyAddress); + } else { + mRoutes.clear(); } } @@ -814,6 +816,8 @@ void AccountParams::writeToConfigFile(LinphoneConfig *config, int index) { auto routesString = L_GET_C_LIST_FROM_CPP_LIST(getRoutesString()); linphone_config_set_string_list(config, key, "reg_route", routesString); bctbx_list_free_with_data(routesString, (bctbx_list_free_func)bctbx_free); + } else { + linphone_config_clean_entry(config, key, "reg_route"); } if (!mIdentity.empty()) { linphone_config_set_string(config, key, "reg_identity", mIdentity.c_str()); -- GitLab