[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] Unsafe call to exosip api while handling dtmf
From: |
Simon Morlat |
Subject: |
Re: [Linphone-developers] Unsafe call to exosip api while handling dtmf info |
Date: |
Thu, 17 Feb 2011 13:13:41 +0100 |
Thanks a lot for noticing this bug. I merge the patch.
Simon
Le mardi 15 février 2011 à 15:25 +0100, damico a écrit :
> Hi,
> I found a little bug in process_dtmf_relay(): the call of
> eXosip_call_build_answer() and eXosip_call_send_answer() are not
> safe... non locked exosip's calls can create (rare cases) very odd
> behavior.
>
> Regards
>
> --Michele
>
>
>
> b7dc3e3457e58ca065298da79886eb1f62f5dfee
>
> coreapi/sal_eXosip2.c | 2 ++
>
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c
>
> index 61c7c49..62e6bc5 100644
>
> --- a/coreapi/sal_eXosip2.c
>
> +++ b/coreapi/sal_eXosip2.c
>
> @@ -1343,9 +1343,11 @@ static void process_dtmf_relay(Sal *sal,
> eXosip_event_t *ev){
>
> sal->callbacks.dtmf_received(op, tmp[0]);
>
> }
>
> }
>
> + eXosip_lock();
>
> eXosip_call_build_answer(ev->tid,200,&ans);
>
> if (ans)
>
> eXosip_call_send_answer(ev->tid,200,ans);
>
> + eXosip_unlock();
>
> }
>
> }
>
>
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers