multicall bugfixes again

This commit is contained in:
Simon Morlat 2011-02-03 14:00:23 +01:00
parent 53859fc1ea
commit b072921802
2 changed files with 17 additions and 5 deletions

View file

@ -305,16 +305,28 @@ static void call_accepted(SalOp *op){
linphone_core_update_streams (lc,call,md);
linphone_call_set_state(call,LinphoneCallPausedByRemote,"Call paused by remote");
}else{
if (lc->vtable.display_status){
lc->vtable.display_status(lc,_("Call answered - connected."));
}
if (call->state==LinphoneCallStreamsRunning){
/*media was running before, the remote as acceted a call modification (that is
a reinvite made by us. We must notify the application this reinvite was accepted*/
linphone_call_set_state(call, LinphoneCallUpdated, "Call updated");
}else{
if (call->state==LinphoneCallResuming){
if (lc->vtable.display_status){
lc->vtable.display_status(lc,_("Call resumed."));
}
}else{
if (lc->vtable.display_status){
char *tmp=linphone_call_get_remote_address_as_string (call);
char *msg=ms_strdup_printf(_("Call answered by %s."),tmp);
lc->vtable.display_status(lc,msg);
ms_free(tmp);
ms_free(msg);
}
}
}
linphone_core_update_streams (lc,call,md);
linphone_call_set_state(call, LinphoneCallStreamsRunning, "Streams running");
lc->current_call=call;
}
}else{
/*send a bye*/

View file

@ -129,9 +129,9 @@ static SalStreamDir compute_dir_incoming(SalStreamDir local, SalStreamDir offere
if (local==SalStreamSendRecv){
if (offered==SalStreamSendOnly)
res=SalStreamRecvOnly;
if (offered==SalStreamRecvOnly)
else if (offered==SalStreamRecvOnly)
res=SalStreamSendOnly;
if (offered==SalStreamInactive)
else if (offered==SalStreamInactive)
res=SalStreamInactive;
else
res=SalStreamSendRecv;