summaryrefslogtreecommitdiff
path: root/main/indications.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2009-02-26 15:40:10 +0000
committerJoshua Colp <jcolp@digium.com>2009-02-26 15:40:10 +0000
commit3c342501e3faafac7f1ef0283516e432e7a8fa0a (patch)
treedf8cd26f8da03b3c5393e8983a54ee33ba28fd23 /main/indications.c
parent775ffb66d09512a9f05a1811d47a04d7b9cbb83e (diff)
Ensure there is a valid tone part before trying to play tones.
(closes issue #14558) Reported by: alecdavis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/indications.c')
-rw-r--r--main/indications.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/indications.c b/main/indications.c
index 1fe01f148..5b26ff239 100644
--- a/main/indications.c
+++ b/main/indications.c
@@ -374,6 +374,11 @@ int ast_playtones_start(struct ast_channel *chan, int vol, const char *playlst,
d.nitems++;
}
+ if (!d.nitems) {
+ ast_log(LOG_ERROR, "No valid tone parts\n");
+ return -1;
+ }
+
if (ast_activate_generator(chan, &playtones, &d)) {
ast_free(d.items);
return -1;