mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 22:28:07 +00:00
proxy.c: linphone_proxy_config_set_route now returns -1 if route is invalid
This commit is contained in:
parent
90427700c2
commit
def7b77e15
2 changed files with 4 additions and 8 deletions
|
|
@ -87,6 +87,7 @@ LINPHONE_PUBLIC int linphone_proxy_config_set_identity_address(LinphoneProxyConf
|
|||
* Sets a SIP route.
|
||||
* When a route is set, all outgoing calls will go to the route's destination if this proxy
|
||||
* is the default one (see linphone_core_set_default_proxy() ).
|
||||
* @Return -1 if route is invalid, 0 otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC int linphone_proxy_config_set_route(LinphoneProxyConfig *cfg, const char *route);
|
||||
|
||||
|
|
|
|||
|
|
@ -259,11 +259,6 @@ const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg){
|
|||
return cfg->identity_address ? linphone_address_get_domain(cfg->identity_address) : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a SIP route.
|
||||
* When a route is set, all outgoing calls will go to the route's destination if this proxy
|
||||
* is the default one (see linphone_core_set_default_proxy() ).
|
||||
**/
|
||||
int linphone_proxy_config_set_route(LinphoneProxyConfig *cfg, const char *route)
|
||||
{
|
||||
if (cfg->reg_route!=NULL){
|
||||
|
|
@ -280,13 +275,13 @@ int linphone_proxy_config_set_route(LinphoneProxyConfig *cfg, const char *route)
|
|||
addr=sal_address_new(tmp);
|
||||
if (addr!=NULL){
|
||||
sal_address_destroy(addr);
|
||||
cfg->reg_route=tmp;
|
||||
return 0;
|
||||
}else{
|
||||
ms_free(tmp);
|
||||
tmp=NULL;
|
||||
}
|
||||
cfg->reg_route=tmp;
|
||||
}
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool_t linphone_proxy_config_check(LinphoneCore *lc, LinphoneProxyConfig *cfg){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue