Commit 2a5c2296 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Merge branch 'master' of git.linphone.org:linphone

parents 38edecaf 9563b0d1
......@@ -350,7 +350,7 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
we get a chance to discover our nat'd address before answering.*/
call->ping_op=sal_op_new(lc->sal);
from_str=linphone_address_as_string_uri_only(from);
sal_op_set_route(call->ping_op,sal_op_get_network_origin(call->op));
sal_op_set_route(call->ping_op,sal_op_get_network_origin(op));
sal_op_set_user_pointer(call->ping_op,call);
sal_ping(call->ping_op,linphone_core_find_best_identity(lc,from,NULL),from_str);
ms_free(from_str);
......
......@@ -1630,18 +1630,17 @@ static void monitor_network_state(LinphoneCore *lc, time_t curtime){
}
static void proxy_update(LinphoneCore *lc){
MSList *elem,*next;
ms_list_for_each(lc->sip_conf.proxies,(void (*)(void*))&linphone_proxy_config_update);
MSList* list=ms_list_copy(lc->sip_conf.deleted_proxies);
MSList* copy=list;
for(;list!=NULL;list=list->next){
LinphoneProxyConfig* cfg = (LinphoneProxyConfig*) list->data;
for(elem=lc->sip_conf.deleted_proxies;elem!=NULL;elem=next){
LinphoneProxyConfig* cfg = (LinphoneProxyConfig*)elem->data;
next=elem->next;
if (ms_time(NULL) - cfg->deletion_date > 5) {
lc->sip_conf.deleted_proxies =ms_list_remove(lc->sip_conf.deleted_proxies,(void *)cfg);
lc->sip_conf.deleted_proxies =ms_list_remove_link(lc->sip_conf.deleted_proxies,elem);
ms_message("clearing proxy config for [%s]",linphone_proxy_config_get_addr(cfg));
linphone_proxy_config_destroy(cfg);
}
}
ms_list_free(copy);
}
static void assign_buddy_info(LinphoneCore *lc, BuddyInfo *info){
......
......@@ -172,16 +172,20 @@ int linphone_proxy_config_set_route(LinphoneProxyConfig *obj, const char *route)
obj->reg_route=NULL;
}
if (route!=NULL){
LinphoneAddress *addr;
SalAddress *addr;
char *tmp;
/*try to prepend 'sip:' */
if (strstr(route,"sip:")==NULL){
obj->reg_route=ms_strdup_printf("sip:%s",route);
}else obj->reg_route=ms_strdup(route);
addr=linphone_address_new(obj->reg_route);
if (addr==NULL){
ms_free(obj->reg_route);
obj->reg_route=NULL;
}else linphone_address_destroy(addr);
tmp=ms_strdup_printf("sip:%s",route);
}else tmp=ms_strdup(route);
addr=sal_address_new(tmp);
if (addr!=NULL){
sal_address_destroy(addr);
}else{
ms_free(tmp);
tmp=NULL;
}
obj->reg_route=tmp;
}
return 0;
}
......@@ -516,11 +520,9 @@ struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig
**/
int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){
if (!linphone_proxy_config_check(lc,cfg)) {
linphone_proxy_config_destroy(cfg);
return -1;
}
if (ms_list_find(lc->sip_conf.proxies,cfg)!=NULL){
linphone_proxy_config_destroy(cfg);
ms_warning("ProxyConfig already entered, ignored.");
return 0;
}
......
......@@ -717,8 +717,8 @@ int sal_ping(SalOp *op, const char *from, const char *to){
sal_op_set_from(op,from);
sal_op_set_to(op,to);
sal_exosip_fix_route(op);
/*bug here: eXosip2 does not honor the route argument*/
eXosip_options_build_request (&options, sal_op_get_to(op),
sal_op_get_from(op),sal_op_get_route(op));
if (options){
......@@ -2216,10 +2216,10 @@ void sal_address_set_param(SalAddress *u,const char* name,const char* value) {
osip_uri_param_t *param=NULL;
osip_uri_uparam_get_byname(((osip_from_t*)u)->url,(char*)name,&param);
if (param == NULL){
osip_uri_uparam_add (((osip_from_t*)u)->url,ms_strdup(name),ms_strdup(value));
osip_uri_uparam_add (((osip_from_t*)u)->url,ms_strdup(name),value ? ms_strdup(value) : NULL);
} else {
osip_free(param->gvalue);
param->gvalue=osip_strdup(value);
param->gvalue=value ? osip_strdup(value) : NULL;
}
}
......
......@@ -92,6 +92,7 @@ int sal_text_send(SalOp *op, const char *from, const char *to, const char *msg){
if (to)
sal_op_set_to(op,to);
sal_exosip_fix_route(op);
eXosip_lock();
eXosip_message_build_request(&sip,"MESSAGE",sal_op_get_to(op),
sal_op_get_from(op),sal_op_get_route(op));
......
mediastreamer2 @ e25eb668
Subproject commit b6cc1a559e5730321974fa88b6d3e35cf91e1d31
Subproject commit e25eb6683a0ae9933b59eb9023424e2333c5d236
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment