]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge Script <automerge@asterisk.org>
Fri, 25 May 2007 14:16:47 +0000 (14:16 +0000)
committerAutomerge Script <automerge@asterisk.org>
Fri, 25 May 2007 14:16:47 +0000 (14:16 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@66156 65c4cc65-6c06-0410-ace0-fbb531ad65f3

say.c

diff --git a/say.c b/say.c
index 4e9f23703086948f29a5b8e64d371c9824e8f615..077a057a357ca5fa415bd9caec71a588c6bd642f 100644 (file)
--- a/say.c
+++ b/say.c
@@ -4573,32 +4573,7 @@ int ast_say_date_with_format_nl(struct ast_channel *chan, time_t time, const cha
                                break;
                        case 'S':
                                /* Seconds */
-                               if (tm.tm_sec == 0) {
-                                       snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_sec);
-                                       res = wait_file(chan,ints,nextmsg,lang);
-                               } else if (tm.tm_sec < 10) {
-                                       res = wait_file(chan,ints, "digits/oh",lang);
-                                       if (!res) {
-                                               snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_sec);
-                                               res = wait_file(chan,ints,nextmsg,lang);
-                                       }
-                               } else if ((tm.tm_sec < 21) || (tm.tm_sec % 10 == 0)) {
-                                       snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_sec);
-                                       res = wait_file(chan,ints,nextmsg,lang);
-                               } else {
-                                       int ten, one;
-                                       ten = (tm.tm_sec / 10) * 10;
-                                       one = (tm.tm_sec % 10);
-                                       snprintf(nextmsg,sizeof(nextmsg), "digits/%d", ten);
-                                       res = wait_file(chan,ints,nextmsg,lang);
-                                       if (!res) {
-                                               /* Fifty, not fifty-zero */
-                                               if (one != 0) {
-                                                       snprintf(nextmsg,sizeof(nextmsg), "digits/%d", one);
-                                                       res = wait_file(chan,ints,nextmsg,lang);
-                                               }
-                                       }
-                               }
+                               res = ast_say_number(chan, tm.tm_sec, ints, lang, (char *) NULL);
                                break;
                        case 'T':
                                res = ast_say_date_with_format(chan, time, ints, lang, "HMS", timezone);