aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-06 22:31:41 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-06 22:31:41 +0000
commitc83c00aaa23037bf53ad705b8e93429980515a86 (patch)
tree8f22c945cd2f70ab1178f277e06dbfa98a08e650 /channels/chan_dahdi.c
parent2256b384e9dc8b9b3490fe64d8f914410e2ac142 (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.6.2@222397 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 588be0d5a..2874425a0 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -12657,8 +12657,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);