diff options
author | Benny Prijono <bennylp@teluu.com> | 2012-12-05 10:40:56 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2012-12-05 10:40:56 +0000 |
commit | 05d4e8df4d6b13628230fc69af143843a06e6839 (patch) | |
tree | 639726ba885a64343fd0d1cd7dbf3aacf346b742 | |
parent | b506f8decdf03624ad88e83f6d03a0fcd0c14cb4 (diff) |
Misc (re #1562): Add a protection in med_tp_timer_cb() against call that may have been terminated before ICE callback is called. It has been reported that this has caused a crash, but we cannot reproduce it. Thanks Karina for the report.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4305 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_media.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c index 58dc441e..abfeea7d 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -570,7 +570,12 @@ static void med_tp_timer_cb(void *user_data) pjsua_call *call = NULL; pjsip_dialog *dlg = NULL; - acquire_call("med_tp_timer_cb", call_med->call->index, &call, &dlg); + if (acquire_call("med_tp_timer_cb", call_med->call->index, + &call, &dlg) != PJ_SUCCESS) + { + /* Call have been terminated */ + return; + } (*call_med->med_create_cb)(call_med, call_med->tp_ready, call_med->call->secure_level, NULL); |