aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-26 23:10:49 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-26 23:10:49 +0000
commit820612d2f8bb542a9c9aa14d6aea10dee452c9fd (patch)
treebe8118f532fdb04908c4a002f1b258d689dae2cc
parent92101626b595c90b4be276355ca8026dfda9adf8 (diff)
After issuing a "say load new", if a caller hangs up during the middle of playback of a number,
app_playback will continue to try to play the remaining files. With this change, no more files will be played back upon hangup. (closes issue #11345, reported and patched by IgorG) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89618 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_playback.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_playback.c b/apps/app_playback.c
index c5f36cdc5..ae06b59a8 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -192,7 +192,7 @@ static int do_say(say_args_t *a, const char *s, const char *options, int depth)
AST_LIST_INSERT_HEAD(&head, n, entries);
/* scan the body, one piece at a time */
- while ( ret <= 0 && (x = strsep(&rule, ",")) ) { /* exit on key */
+ while ( !ret && (x = strsep(&rule, ",")) ) { /* exit on key */
char fn[128];
const char *p, *fmt, *data; /* format and data pointers */
@@ -241,6 +241,10 @@ static int do_say(say_args_t *a, const char *s, const char *options, int depth)
strcpy(fn2 + l, data);
ret = do_say(a, fn2, options, depth);
}
+
+ if (ret) {
+ break;
+ }
}
}
ast_var_delete(n);