diff --git a/linphone/coreapi/callbacks.c b/my_version_to_patch/linphone_with_very_improved_refer/coreapi/callbacks.c index 5461531..91fa6c2 100644 --- a/linphone/coreapi/callbacks.c +++ b/my_version_to_patch/linphone_with_very_improved_refer/coreapi/callbacks.c @@ -396,6 +396,7 @@ static void refer_received(Sal *sal, SalOp *op, const char *referto){ LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal); if(op != NULL) { + eXosip_lock(); eXosip_call_build_notify(op->tid,EXOSIP_SUBCRSTATE_ACTIVE,&msg); if(msg != NULL) { @@ -404,6 +405,7 @@ static void refer_received(Sal *sal, SalOp *op, const char *referto){ osip_message_set_body(msg,"SIP/2.0 100 Trying",sizeof("SIP/2.0 100 Trying")); eXosip_call_send_request(op->tid,msg); } + eXosip_unlock(); } if (lc->vtable.refer_received) lc->vtable.refer_received(lc,referto); diff --git a/linphone/coreapi/sal_eXosip2.c b/my_version_to_patch/linphone_with_very_improved_refer/coreapi/sal_eXosip2.c index 82bae96..bae7d8b 100644 --- a/linphone/coreapi/sal_eXosip2.c +++ b/my_version_to_patch/linphone_with_very_improved_refer/coreapi/sal_eXosip2.c @@ -1099,6 +1099,10 @@ static void call_message_new(Sal *sal, eXosip_event_t *ev){ SalOp *op=(SalOp*)ev->external_reference; sal->callbacks.refer_received(sal,op,h->hvalue); } + else + { + ms_warning("cannot do anything with the refer without destination\n"); + } } if(MSG_IS_NOTIFY(ev->request)){ osip_header_t *h=NULL;