|
From: | damico |
Subject: | [Linphone-developers] Unsafe call to exosip api while handling dtmf info |
Date: | Tue, 15 Feb 2011 15:25:59 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
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(); } }
|
[Prev in Thread] | Current Thread | [Next in Thread] |