aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-31 23:50:10 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-31 23:50:10 +0000
commitfeff2e2395771695d50ad5d6189302c4045e2683 (patch)
tree4391b7ad77d3fb134ad58f6aae473349b2c36938
parent12027faac4320a94e05e00a2237f4e3bce17d27c (diff)
Merged revisions 305341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r305341 | rmudgett | 2011-01-31 17:45:58 -0600 (Mon, 31 Jan 2011) | 7 lines Obtain the pri lock for PRI queue counters. Need to obtain the pri lock when calling pri_dump_info_str() to avoid a reentrancy problem when calculating the Q.921 Q count statistic. JIRA AST-484 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@305342 f38db490-d61c-443f-a65b-d21fe96a405b
-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 ae07c0a87..b681ba906 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -14395,6 +14395,7 @@ static char *handle_pri_show_span(struct ast_cli_entry *e, int cmd, struct ast_c
ast_cli(a->fd, "%s D-channel: %d\n", pri_order(x), pris[span-1].dchannels[x]);
build_status(status, sizeof(status), pris[span-1].dchanavail[x], pris[span-1].dchans[x] == pris[span-1].pri);
ast_cli(a->fd, "Status: %s\n", status);
+ ast_mutex_lock(&pris[span - 1].lock);
#ifdef PRI_DUMP_INFO_STR
info_str = pri_dump_info_str(pris[span-1].pri);
if (info_str) {
@@ -14404,6 +14405,7 @@ static char *handle_pri_show_span(struct ast_cli_entry *e, int cmd, struct ast_c
#else
pri_dump_info(pris[span-1].pri);
#endif
+ ast_mutex_unlock(&pris[span - 1].lock);
ast_cli(a->fd, "Overlap Recv: %s\n\n", (pris[span-1].overlapdial & DAHDI_OVERLAPDIAL_INCOMING)?"Yes":"No");
}
}