aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-27 16:52:29 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-27 16:52:29 +0000
commit7281a36fb2e3f2ec4dee389026e35afa8235e255 (patch)
tree4cb5325cafaeedd9628e741d575ddc0f49f4f04e
parent8e4d50cbf3c21b66010ef42d0b216237c09a2654 (diff)
Re-fix dahdi_request() iflist locking since CCSS merged.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@259229 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_dahdi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index aae30d3da..2ae8cf92d 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -12522,15 +12522,16 @@ static struct ast_channel *dahdi_request(const char *type, format_t format, cons
int transcapdigital = 0;
struct dahdi_starting_point start;
+ ast_mutex_lock(&iflock);
p = determine_starting_point(data, &start);
if (!p) {
/* We couldn't determine a starting point, which likely means badly-formatted channel name. Abort! */
+ ast_mutex_unlock(&iflock);
return NULL;
}
/* Search for an unowned channel */
exitpvt = p;
- ast_mutex_lock(&iflock);
while (p && !tmp) {
if (start.roundrobin)
round_robin[start.rr_starting_point] = p;
@@ -12714,11 +12715,12 @@ static int dahdi_cc_callback(struct ast_channel *inbound, const char *dest, ast_
int groupmatched = 0;
int channelmatched = 0;
+ ast_mutex_lock(&iflock);
p = determine_starting_point(dest, &start);
if (!p) {
+ ast_mutex_unlock(&iflock);
return -1;
}
- ast_mutex_lock(&iflock);
exitpvt = p;
for (;;) {
if (is_group_or_channel_match(p, start.span, start.groupmatch, &groupmatched, start.channelmatch, &channelmatched)) {