Skip to content
Snippets Groups Projects
Commit 4a71b080 authored by Sean Bright's avatar Sean Bright Committed by George Joseph
Browse files

app_read: Release tone zone reference on early return.

Change-Id: I350939f2220f9e5d44ddf4c8d9a4c99fde4d169a
parent 620d9f47
No related branches found
No related tags found
3 merge requests!138Merge branch asterisk-20.3.0 into devel properly,!123Merge asterisk '20.3.0' into devel,!118Draft: manager: AOC-S support for AOCMessage
......@@ -195,6 +195,9 @@ static int read_exec(struct ast_channel *chan, const char *data)
if (ast_channel_state(chan) != AST_STATE_UP) {
if (ast_test_flag(&flags, OPT_SKIP)) {
/* At the user's option, skip if the line is not up */
if (ts) {
ts = ast_tone_zone_sound_unref(ts);
}
pbx_builtin_setvar_helper(chan, arglist.variable, "");
pbx_builtin_setvar_helper(chan, "READSTATUS", "SKIPPED");
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment