summaryrefslogtreecommitdiff
path: root/pbx/pbx_dundi.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbx/pbx_dundi.c')
-rw-r--r--pbx/pbx_dundi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index cd7e96937..62c2c558b 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -3613,13 +3613,13 @@ static void dundi_precache_full(void)
AST_LIST_TRAVERSE(&mappings, cur, list) {
ast_log(LOG_NOTICE, "Should precache context '%s'\n", cur->dcontext);
- ast_lock_contexts();
+ ast_rdlock_contexts();
con = NULL;
while ((con = ast_walk_contexts(con))) {
if (strcasecmp(cur->lcontext, ast_get_context_name(con)))
continue;
/* Found the match, now queue them all up */
- ast_lock_context(con);
+ ast_rdlock_context(con);
e = NULL;
while ((e = ast_walk_context_extensions(con, e)))
reschedule_precache(ast_get_extension_name(e), cur->dcontext, 0);