aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-24 21:58:49 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-24 21:58:49 +0000
commitafd58e641f89aa90044f23c185fc28194cdda416 (patch)
tree5f14e3e2422a521676ee2084d53663aca88e2a64 /channels
parentb2c68285f0552b098394b0000c6d86c888f9c858 (diff)
ss_thread calls pri_grab without lock during overlap dial
Recent changes to chan_dahdi with relation to overlap dialing call pri_grab without first obtaining a lock. (closes issue #17414) Reported by: pdf Patches: bug17414.patch uploaded by jpeeler (license 325) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@272446 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 9cd089a93..9eef9e3c1 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -6048,6 +6048,7 @@ static void *ss_thread(void *data)
ast_dsp_digitreset(p->dsp);
}
if (p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) {
+ ast_mutex_lock(&p->lock);
if (p->pri->pri) {
if (!pri_grab(p, p->pri)) {
pri_proceeding(p->pri->pri, p->call, PVT_TO_CHANNEL(p), 0);
@@ -6057,6 +6058,7 @@ static void *ss_thread(void *data)
ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
}
}
+ ast_mutex_unlock(&p->lock);
}
dahdi_enable_ec(p);
ast_setstate(chan, AST_STATE_RING);