summaryrefslogtreecommitdiff
path: root/res/parking
diff options
context:
space:
mode:
Diffstat (limited to 'res/parking')
-rw-r--r--res/parking/parking_bridge_features.c2
-rw-r--r--res/parking/parking_manager.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/res/parking/parking_bridge_features.c b/res/parking/parking_bridge_features.c
index 4f39e2e94..a939fdac7 100644
--- a/res/parking/parking_bridge_features.c
+++ b/res/parking/parking_bridge_features.c
@@ -530,6 +530,7 @@ static int parking_duration_callback(struct ast_bridge_channel *bridge_channel,
/* Set parking timeout channel variables */
snprintf(parking_space, sizeof(parking_space), "%d", user->parking_space);
+ ast_channel_lock(chan);
ast_channel_stage_snapshot(chan);
pbx_builtin_setvar_helper(chan, "PARKING_SPACE", parking_space);
pbx_builtin_setvar_helper(chan, "PARKINGSLOT", parking_space); /* Deprecated version of PARKING_SPACE */
@@ -538,6 +539,7 @@ static int parking_duration_callback(struct ast_bridge_channel *bridge_channel,
pbx_builtin_setvar_helper(chan, "PARKER_FLAT", dial_string_flat);
parking_timeout_set_caller_features(chan, user->lot->cfg);
ast_channel_stage_snapshot_done(chan);
+ ast_channel_unlock(chan);
/* Dialplan generation for park-dial extensions */
diff --git a/res/parking/parking_manager.c b/res/parking/parking_manager.c
index 0c577018a..507273aec 100644
--- a/res/parking/parking_manager.c
+++ b/res/parking/parking_manager.c
@@ -155,7 +155,9 @@ static struct ast_parked_call_payload *parked_call_payload_from_failure(struct a
RAII_VAR(struct ast_parked_call_payload *, payload, NULL, ao2_cleanup);
RAII_VAR(struct ast_channel_snapshot *, parkee_snapshot, NULL, ao2_cleanup);
+ ast_channel_lock(chan);
parkee_snapshot = ast_channel_snapshot_create(chan);
+ ast_channel_unlock(chan);
if (!parkee_snapshot) {
return NULL;
}
@@ -172,7 +174,9 @@ static struct ast_parked_call_payload *parked_call_payload_from_parked_user(stru
struct timeval now = ast_tvnow();
const char *lot_name = pu->lot->name;
+ ast_channel_lock(pu->chan);
parkee_snapshot = ast_channel_snapshot_create(pu->chan);
+ ast_channel_unlock(pu->chan);
if (!parkee_snapshot) {
return NULL;