diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-09-19 13:37:53 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-09-19 13:37:53 +0000 |
commit | 4b188d682a36a7fa454884ca55b5cf5a7bad069c (patch) | |
tree | c7f94ec4bd11263869fc2ed8804a7864a93a0591 /pjsip-apps | |
parent | cf81bc0a2ab2947f4a2c5c5fd20bc77ea5611947 (diff) |
Fixed race-condition/deadlock problems in the dialog/user agent layer
all the way up to PJSUA-API:
- standardized locking order: dialog then user agent, and dialog then PJSUA
- any threads that attempt to acquire mutexes in different order than
above MUST employ retry mechanism (for an example, see acquire_call() in
pjsua_call.c). This retry mechanism has also been used in the UA layer
(sip_ua_layer.c) since it needs to lock user agent layer first before
the dialog.
- introduced pjsip_dlg_try_inc_lock() and PJSUA_TRY_LOCK() to accomodate
above.
- pjsua tested on Quad Xeon with 4 threads and 200 cps, so far so good.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@729 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index 57b6ad2e..0a495b03 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -1196,6 +1196,11 @@ static void call_timeout_callback(pj_timer_heap_t *timer_heap, PJ_UNUSED_ARG(timer_heap); + if (call_id == PJSUA_INVALID_ID) { + PJ_LOG(1,(THIS_FILE, "Invalid call ID in timer callback")); + return; + } + /* Add warning header */ pjsua_msg_data_init(&msg_data); pjsip_generic_string_hdr_init2(&warn, &hname, &hvalue); |