mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 04:28:10 +00:00
fix bug regarding calls that might be accepted while the application already declined it
This commit is contained in:
parent
db00bf2a3e
commit
68fa025802
2 changed files with 8 additions and 7 deletions
|
|
@ -223,7 +223,6 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
|
|||
/* this function is called internally to get rid of a call.
|
||||
It performs the following tasks:
|
||||
- remove the call from the internal list of calls
|
||||
- unref the LinphoneCall object
|
||||
- update the call logs accordingly
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1015,13 +1015,12 @@ static void update_contact_from_response(SalOp *op, osip_message_t *response){
|
|||
|
||||
static int call_proceeding(Sal *sal, eXosip_event_t *ev){
|
||||
SalOp *op=find_op(sal,ev);
|
||||
|
||||
if (op==NULL) {
|
||||
|
||||
if (op==NULL || op->terminated==TRUE) {
|
||||
ms_warning("This call has been canceled.");
|
||||
eXosip_lock();
|
||||
eXosip_call_terminate(ev->cid,ev->did);
|
||||
eXosip_unlock();
|
||||
op->terminated=TRUE;
|
||||
return -1;
|
||||
}
|
||||
if (ev->did>0)
|
||||
|
|
@ -1056,9 +1055,12 @@ static void call_accepted(Sal *sal, eXosip_event_t *ev){
|
|||
SalOp *op=find_op(sal,ev);
|
||||
const char *contact;
|
||||
|
||||
if (op==NULL){
|
||||
ms_error("A closed call is accepted ?");
|
||||
return;
|
||||
if (op==NULL || op->terminated==TRUE) {
|
||||
ms_warning("This call has been already terminated.");
|
||||
eXosip_lock();
|
||||
eXosip_call_terminate(ev->cid,ev->did);
|
||||
eXosip_unlock();
|
||||
return ;
|
||||
}
|
||||
|
||||
op->did=ev->did;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue