diff --git a/linphone/coreapi/linphonecore.h b/linphone/coreapi/linphonecore.h index cc070cb9118154a469959850a1834026ea43444b..a86abe12d0219dab9a066ac9bcff87aa6f5090b6 100644 --- a/linphone/coreapi/linphonecore.h +++ b/linphone/coreapi/linphonecore.h @@ -352,7 +352,6 @@ int linphone_proxy_config_done(LinphoneProxyConfig *obj); void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val); bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj); const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg); - /** Returns the proxy configured identity as a const char * */ #define linphone_proxy_config_get_route(obj) ((obj)->reg_route) /** Returns the proxy configured identity as a const char * */ @@ -723,6 +722,8 @@ bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config); +void linphone_core_clear_proxy_config(LinphoneCore *lc); + void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config); const MSList *linphone_core_get_proxy_config_list(const LinphoneCore *lc); diff --git a/linphone/coreapi/proxy.c b/linphone/coreapi/proxy.c index 75e918f62cfc2a2e3702a9b8bfd5585e9275bfb6..9278279e9e78d14e3a6413afb1cdc84a02827f45 100644 --- a/linphone/coreapi/proxy.c +++ b/linphone/coreapi/proxy.c @@ -557,7 +557,17 @@ void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cf } } - +/** + * Erase all proxies from config. + * + * @ingroup proxy +**/ +void linphone_core_clear_proxy_config(LinphoneCore *lc){ + const MSList* list=linphone_core_get_proxy_config_list((const LinphoneCore*)lc); + for(;list!=NULL;list=list->next){ + linphone_core_remove_proxy_config(lc,(LinphoneProxyConfig *)list->data); + } +} /** * Sets the default proxy. *