mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
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
This commit is contained in:
@@ -374,6 +374,11 @@ int ast_playtones_start(struct ast_channel *chan, int vol, const char *playlst,
|
|||||||
d.nitems++;
|
d.nitems++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!d.nitems) {
|
||||||
|
ast_log(LOG_ERROR, "No valid tone parts\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (ast_activate_generator(chan, &playtones, &d)) {
|
if (ast_activate_generator(chan, &playtones, &d)) {
|
||||||
ast_free(d.items);
|
ast_free(d.items);
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user