summaryrefslogtreecommitdiff
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 d3121234f..5ab13babc 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -3155,8 +3155,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);
}
/*!