forked from mirrors/linphone-iphone
Merge branch 'master' of git.savannah.nongnu.org:/srv/git/linphone
This commit is contained in:
commit
e501025d02
7 changed files with 21 additions and 25 deletions
|
|
@ -343,7 +343,6 @@ static void call_updating(SalOp *op){
|
|||
linphone_call_set_state (call,prevstate,"Connected (streams running)");
|
||||
}
|
||||
}
|
||||
if (lc->current_call==NULL) linphone_core_start_pending_refered_calls (lc);
|
||||
}
|
||||
|
||||
static void call_terminated(SalOp *op, const char *from){
|
||||
|
|
@ -556,7 +555,11 @@ static void refer_received(Sal *sal, SalOp *op, const char *referto){
|
|||
lc->vtable.display_status(lc,msg);
|
||||
ms_free(msg);
|
||||
}
|
||||
if (lc->current_call==NULL) linphone_core_start_pending_refered_calls (lc);
|
||||
if (call->state!=LinphoneCallPaused){
|
||||
ms_message("Automatically pausing current call to accept transfer.");
|
||||
linphone_core_pause_call(lc,call);
|
||||
}
|
||||
linphone_core_start_refered_call(lc,call);
|
||||
sal_call_accept_refer(op);
|
||||
}else if (lc->vtable.refer_received){
|
||||
lc->vtable.refer_received(lc,referto);
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ static void linphone_call_set_terminated(LinphoneCall *call){
|
|||
if (call == lc->current_call){
|
||||
ms_message("Resetting the current call");
|
||||
lc->current_call=NULL;
|
||||
linphone_core_start_pending_refered_calls(lc);
|
||||
}
|
||||
|
||||
if (linphone_core_del_call(lc,call) != 0){
|
||||
|
|
|
|||
|
|
@ -1839,19 +1839,14 @@ const char * linphone_core_get_route(LinphoneCore *lc){
|
|||
return route;
|
||||
}
|
||||
|
||||
void linphone_core_start_pending_refered_calls(LinphoneCore *lc){
|
||||
MSList *elem;
|
||||
for(elem=lc->calls;elem!=NULL;elem=elem->next){
|
||||
LinphoneCall *call=(LinphoneCall*)elem->data;
|
||||
if (call->refer_pending){
|
||||
LinphoneCallParams *cp=linphone_core_create_default_call_parameters(lc);
|
||||
cp->referer=call;
|
||||
ms_message("Starting new call to refered address %s",call->refer_to);
|
||||
call->refer_pending=FALSE;
|
||||
linphone_core_invite_with_params(lc,call->refer_to,cp);
|
||||
linphone_call_params_destroy(cp);
|
||||
break;
|
||||
}
|
||||
void linphone_core_start_refered_call(LinphoneCore *lc, LinphoneCall *call){
|
||||
if (call->refer_pending){
|
||||
LinphoneCallParams *cp=linphone_core_create_default_call_parameters(lc);
|
||||
cp->referer=call;
|
||||
ms_message("Starting new call to refered address %s",call->refer_to);
|
||||
call->refer_pending=FALSE;
|
||||
linphone_core_invite_with_params(lc,call->refer_to,cp);
|
||||
linphone_call_params_destroy(cp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2425,7 +2420,6 @@ int linphone_core_pause_call(LinphoneCore *lc, LinphoneCall *the_call)
|
|||
lc->current_call=NULL;
|
||||
if (call->audiostream || call->videostream)
|
||||
linphone_call_stop_media_streams (call);
|
||||
linphone_core_start_pending_refered_calls(lc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -754,14 +754,10 @@ static int get_local_ip_for_with_connect(int type, const char *dest, char *resul
|
|||
}
|
||||
|
||||
int linphone_core_get_local_ip_for(int type, const char *dest, char *result){
|
||||
if (dest==NULL) {
|
||||
if (type==AF_INET)
|
||||
dest="87.98.157.38"; /*a public IP address*/
|
||||
else dest="2a00:1450:8002::68";
|
||||
}
|
||||
strcpy(result,type==AF_INET ? "127.0.0.1" : "::1");
|
||||
#ifdef HAVE_GETIFADDRS
|
||||
{
|
||||
if (dest==NULL) {
|
||||
/*we use getifaddrs for lookup of default interface */
|
||||
int found_ifs;
|
||||
|
||||
found_ifs=get_local_ip_with_getifaddrs(type,result,LINPHONE_IPADDR_SIZE);
|
||||
|
|
@ -774,5 +770,8 @@ int linphone_core_get_local_ip_for(int type, const char *dest, char *result){
|
|||
}
|
||||
#endif
|
||||
/*else use connect to find the best local ip address */
|
||||
if (type==AF_INET)
|
||||
dest="87.98.157.38"; /*a public IP address*/
|
||||
else dest="2a00:1450:8002::68";
|
||||
return get_local_ip_for_with_connect(type,dest,result);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ void linphone_core_update_progress(LinphoneCore *lc, const char *purpose, float
|
|||
void linphone_core_stop_waiting(LinphoneCore *lc);
|
||||
|
||||
int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, LinphoneProxyConfig *dest_proxy);
|
||||
void linphone_core_start_pending_refered_calls(LinphoneCore *lc);
|
||||
void linphone_core_start_refered_call(LinphoneCore *lc, LinphoneCall *call);
|
||||
extern SalCallbacks linphone_sal_callbacks;
|
||||
void linphone_proxy_config_set_error(LinphoneProxyConfig *cfg,LinphoneError error);
|
||||
|
||||
|
|
|
|||
|
|
@ -627,6 +627,7 @@ int sal_publish(SalOp *op, const char *from, const char *to, SalPresenceStatus p
|
|||
ms_message("Failed to send publish request.");
|
||||
return -1;
|
||||
}
|
||||
sal_add_other(sal_op_get_sal(op),op,pub);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit bf8706f50f26e17b3ecc1501e70b712ec11d0dc3
|
||||
Subproject commit dcf3eba1afa5615cb01b52b1136d8aa0d224aca2
|
||||
Loading…
Add table
Reference in a new issue