aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 4df500921..c6b67da39 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -2298,8 +2298,10 @@ int ast_spawn_extension(struct ast_channel *c, const char *context, const char *
/* helper function to set extension and priority */
static void set_ext_pri(struct ast_channel *c, const char *exten, int pri)
{
+ ast_channel_lock(c);
ast_copy_string(c->exten, exten, sizeof(c->exten));
c->priority = pri;
+ ast_channel_unlock(c);
}
/*!