aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-09 20:06:31 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-09 20:06:31 +0000
commitbbdc6cafb5a4c952b565135ee3470200673b310f (patch)
treebf8e77f6e4f2525aaca5cf79d01143c9973cdbd2 /main/pbx.c
parent994debde3c3d78011509a53fc68dd6ae27a6024e (diff)
Transmit silence when reading DTMF in ast_readstring.
Otherwise, you could get issues with DTMF timeouts causing hangups. (closes issue #17370) Reported by: makoto Patches: channel-readstring-silence-generator.patch uploaded by makoto (license 38) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@285742 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 1ad2d2e1d..e88bdb879 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -492,7 +492,11 @@ static struct pbx_builtin {
};
static struct ast_context *contexts;
-AST_RWLOCK_DEFINE_STATIC(conlock); /*!< Lock for the ast_context list */
+/*!\brief Lock for the ast_context list
+ * This lock MUST be recursive, or a deadlock on reload may result. See
+ * https://issues.asterisk.org/view.php?id=17643
+ */
+AST_MUTEX_DEFINE_STATIC(conlock);
static AST_LIST_HEAD_STATIC(apps, ast_app);
@@ -6193,22 +6197,22 @@ int load_pbx(void)
*/
int ast_lock_contexts()
{
- return ast_rwlock_wrlock(&conlock);
+ return ast_mutex_lock(&conlock);
}
int ast_rdlock_contexts(void)
{
- return ast_rwlock_rdlock(&conlock);
+ return ast_mutex_lock(&conlock);
}
int ast_wrlock_contexts(void)
{
- return ast_rwlock_wrlock(&conlock);
+ return ast_mutex_lock(&conlock);
}
int ast_unlock_contexts()
{
- return ast_rwlock_unlock(&conlock);
+ return ast_mutex_unlock(&conlock);
}
/*