diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-13 16:20:58 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-13 16:20:58 +0000 |
commit | 8ac37dd0d709a2c77351e90b645b4a163ea65adb (patch) | |
tree | ee4b96957a66188b185814c4c022041da8665b76 /apps/app_playback.c | |
parent | fe55bca29f453d694b66c05683dd6192bd5288ae (diff) |
Move say.conf existence check to do_say function since it is called from multiple places (issue #8144 reported by kshumard)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@45051 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_playback.c')
-rw-r--r-- | apps/app_playback.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/app_playback.c b/apps/app_playback.c index 5dfb589f7..c88d22e74 100644 --- a/apps/app_playback.c +++ b/apps/app_playback.c @@ -156,6 +156,9 @@ static int do_say(say_args_t *a, const char *s, const char *options, int depth) if (depth++ > 10) { ast_log(LOG_WARNING, "recursion too deep, exiting\n"); return -1; + } else if (!say_cfg) { + ast_log(LOG_WARNING, "no say.conf, cannot spell '%s'\n", s); + return -1; } /* scan languages same as in file.c */ @@ -253,11 +256,6 @@ static int say_full(struct ast_channel *chan, const char *string, int audiofd, int ctrlfd) { say_args_t a = { chan, ints, lang, audiofd, ctrlfd }; - - if (!say_cfg) { - ast_log(LOG_WARNING, "no say.conf, cannot spell '%s'\n", string); - return -1; - } return do_say(&a, string, options, 0); } |