aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-06 22:27:13 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-06 22:27:13 +0000
commitae5f30c5d441c4d6c935b2cce33bb6acfaac167f (patch)
treefa310c9bffe37437ba266499b32b6e9a86bb2dca /channels/chan_dahdi.c
parent794f99680480074b901838f1a457fc6b1e1f83f8 (diff)
Fix potential crash when entire span request is received.
The variable index used in this scenario for accessing the dahdi_pvts was wrong and was most likely copied from the several other places it is used correctly. (closes issue #15998) Reported by: tsearle Patches: dahdi_reset_crash.patch uploaded by tsearle (license 373) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@222393 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index f3a27d345..100ce5f71 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -9180,8 +9180,8 @@ static void *pri_dchannel(void *vpri)
pri_destroycall(pri->pri, pri->pvts[x]->call);
pri->pvts[x]->call = NULL;
}
- if (pri->pvts[chanpos]->realcall)
- pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
+ if (pri->pvts[x]->realcall)
+ pri_hangup_all(pri->pvts[x]->realcall, pri);
else if (pri->pvts[x]->owner)
pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
ast_mutex_unlock(&pri->pvts[x]->lock);