diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-19 19:25:20 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-19 19:25:20 +0000 |
commit | 4c762b97c714d4c2a51968a96e2c2f1c237dbd2d (patch) | |
tree | f459f20bd2a2b61a7ed946372950c904d7a369ef | |
parent | 82c1bd4882f34060a174dc67c5ba29053c58ce4f (diff) |
Merged revisions 264331 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r264331 | dvossel | 2010-05-19 14:21:04 -0500 (Wed, 19 May 2010) | 13 lines
fixes crash in check_rtp_timeout
During deadlock avoidance the sip dialog pvt is locked and
unlocked. When this occurs we have no guarantee the pvt's owner
is still valid. We were trying to access the pvt's owner after
this without checking to see if it still existed first.
(closes issue #17271)
Reported by: under
Patches:
check_rtp_timeout.diff uploaded by under (license 914)
Tested by: dvossel
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@264332 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5b6f159f0..eec004aab 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -22475,6 +22475,9 @@ static void check_rtp_timeout(struct sip_pvt *dialog, time_t t) usleep(1); sip_pvt_lock(dialog); } + if (!dialog->owner) { + return; /* channel hangup can occur during deadlock avoidance. */ + } ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n", dialog->owner->name, (long) (t - dialog->lastrtprx)); /* Issue a softhangup */ |