summaryrefslogtreecommitdiff
path: root/res/res_stasis.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_stasis.c')
-rw-r--r--res/res_stasis.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/res/res_stasis.c b/res/res_stasis.c
index 71a18a07f..32de9a041 100644
--- a/res/res_stasis.c
+++ b/res/res_stasis.c
@@ -637,7 +637,9 @@ static int send_start_msg(struct stasis_app *app, struct ast_channel *chan,
ast_assert(chan != NULL);
/* Set channel info */
+ ast_channel_lock(chan);
snapshot = ast_channel_snapshot_create(chan);
+ ast_channel_unlock(chan);
if (!snapshot) {
return -1;
}
@@ -681,7 +683,9 @@ static int send_end_msg(struct stasis_app *app, struct ast_channel *chan)
ast_assert(chan != NULL);
/* Set channel info */
+ ast_channel_lock(chan);
snapshot = ast_channel_snapshot_create(chan);
+ ast_channel_unlock(chan);
if (snapshot == NULL) {
return -1;
}