diff --git a/main/pbx.c b/main/pbx.c index 28e67a2c9a..b28c1fbdb5 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -3267,6 +3267,7 @@ static void handle_statechange(const char *device) { struct ast_hint *hint; + ast_rdlock_contexts(); AST_RWLIST_RDLOCK(&hints); AST_RWLIST_TRAVERSE(&hints, hint, list) { @@ -3304,6 +3305,7 @@ static void handle_statechange(const char *device) } AST_RWLIST_UNLOCK(&hints); + ast_unlock_contexts(); } static int statechange_queue(const char *dev)