<p>Rusty Newton has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6025">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">say.c: Fix file locations for second, seconds, minute, minutes files<br><br>The seconds and minutes files have always existed in the core directory. So<br>say.c has always been calling the wrong location (under digits/) for those two<br>files and in the case of second and minute they didn't exist in core at all.<br><br>The 1.6 sounds release moves the second and minute files into core from<br>Extra for the languages that already had them. A future release will include<br>the second and minute files for languages that didn't already have them.<br><br>This patch just changes all the target locations for second, seconds,<br>minute, and minutes that were under the digits subdir to be under the root of<br>sounds instead. Which is where the sounds will be for some languages after 1.6<br>sounds and for all languages after a future release.<br><br>ASTERISK-25810 #close<br><br>Change-Id: I05d9d4bee6a7237030530a46e7eb3df15f13f702<br>Reported-by: Nicolas Riendeau<br>---<br>M main/say.c<br>1 file changed, 26 insertions(+), 26 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/6025/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/say.c b/main/say.c<br>index 4883250..1d948a8 100644<br>--- a/main/say.c<br>+++ b/main/say.c<br>@@ -4443,9 +4443,9 @@<br>                              }<br>                             if (!res && next_item(&format[offset + 1]) == 'S') { /* minutes only if seconds follow */<br>                                         if (tm.tm_min == 1) {<br>-                                                res = wait_file(chan, ints, "digits/minute", lang);<br>+                                                res = wait_file(chan, ints, "minute", lang);<br>                                        } else {<br>-                                             res = wait_file(chan, ints, "digits/minutes", lang);<br>+                                               res = wait_file(chan, ints, "minutes", lang);<br>                                       }<br>                             }<br>                             break;<br>@@ -4519,7 +4519,7 @@<br>                                 if (!res) {<br>                                   res = ast_say_number(chan, tm.tm_sec, ints, lang, "f");<br>                                     if (!res) {<br>-                                          res = wait_file(chan, ints, "digits/seconds", lang);<br>+                                               res = wait_file(chan, ints, "seconds", lang);<br>                                       }<br>                             }<br>                             break;<br>@@ -4639,16 +4639,16 @@<br>                       case 'M':<br>                             /* Minute */<br>                          if (next_item(&format[offset + 1]) == 'S') { /* zero 'digits/0' only if seconds follow */<br>-                                        res = ast_say_number(chan, tm.tm_min, ints, lang, "f"); /* female only if we say digits/minutes */<br>+                                 res = ast_say_number(chan, tm.tm_min, ints, lang, "f"); /* female only if we say minutes */<br>                                 } else if (tm.tm_min > 0) {<br>                                        res = ast_say_number(chan, tm.tm_min, ints, lang, (char *) NULL);<br>                             }<br> <br>                          if (!res && next_item(&format[offset + 1]) == 'S') { /* minutes only if seconds follow */<br>                                         if (tm.tm_min == 1) {<br>-                                                res = wait_file(chan, ints, "digits/minute", lang);<br>+                                                res = wait_file(chan, ints, "minute", lang);<br>                                        } else {<br>-                                             res = wait_file(chan, ints, "digits/minutes", lang);<br>+                                               res = wait_file(chan, ints, "minutes", lang);<br>                                       }<br>                             }<br>                             break;<br>@@ -4722,7 +4722,7 @@<br>                                 if (!res) {<br>                                   res = ast_say_number(chan, tm.tm_sec, ints, lang, "f");<br>                                     if (!res) {<br>-                                          res = wait_file(chan, ints, tm.tm_sec == 1 ? "digits/second" : "digits/seconds", lang);<br>+                                          res = wait_file(chan, ints, tm.tm_sec == 1 ? "second" : "seconds", lang);<br>                                         }<br>                             }<br>                             break;<br>@@ -4855,9 +4855,9 @@<br>                                 if (!res && next_item(&format[offset + 1]) == 'S') { /* minutes only if seconds follow */<br>                                         /* Say minute/minutes depending on whether minutes end in 1 */<br>                                        if ((tm.tm_min % 10 == 1) && (tm.tm_min != 11)) {<br>-                                            res = wait_file(chan, ints, "digits/minute", lang);<br>+                                                res = wait_file(chan, ints, "minute", lang);<br>                                        } else {<br>-                                             res = wait_file(chan, ints, "digits/minutes", lang);<br>+                                               res = wait_file(chan, ints, "minutes", lang);<br>                                       }<br>                             }<br>                             break;<br>@@ -4932,9 +4932,9 @@<br>                                         res = ast_say_number(chan, tm.tm_sec, ints, lang, "f");<br>                                     /* Say minute/minutes depending on whether seconds end in 1 */<br>                                        if (!res && (tm.tm_sec % 10 == 1) && (tm.tm_sec != 11)) {<br>-                                            res = wait_file(chan, ints, "digits/second", lang);<br>+                                                res = wait_file(chan, ints, "second", lang);<br>                                        } else {<br>-                                             res = wait_file(chan, ints, "digits/seconds", lang);<br>+                                               res = wait_file(chan, ints, "seconds", lang);<br>                                       }<br>                             }<br>                             break;<br>@@ -5654,7 +5654,7 @@<br>                                 /* Seconds */<br>                                 res = ast_say_number(chan, tm.tm_sec, ints, lang, (char * ) NULL);<br>                            if (!res) {<br>-                                  res = wait_file(chan, ints, "digits/second", lang);<br>+                                        res = wait_file(chan, ints, "second", lang);<br>                                }<br>                             break;<br>                        case 'T':<br>@@ -6305,9 +6305,9 @@<br>                                                      one = tm.tm_sec % 10;<br> <br>                                                      if (one > 1 && one < 5 && ten != 1)<br>-                                                            res = wait_file(chan, ints, "digits/seconds", lang);<br>+                                                               res = wait_file(chan, ints, "seconds", lang);<br>                                                       else<br>-                                                         res = wait_file(chan, ints, "digits/second", lang);<br>+                                                                res = wait_file(chan, ints, "second", lang);<br>                                                }<br>                                     }<br>                             }<br>@@ -6471,9 +6471,9 @@<br>                                      res = ast_say_number(chan, tm.tm_min, ints, lang, NULL);<br>                                      if (!res) {<br>                                           if (tm.tm_min > 1) {<br>-                                                      res = wait_file(chan, ints, "digits/minutes", lang);<br>+                                                       res = wait_file(chan, ints, "minutes", lang);<br>                                               } else {<br>-                                                     res = wait_file(chan, ints, "digits/minute", lang);<br>+                                                        res = wait_file(chan, ints, "minute", lang);<br>                                                }<br>                                     }<br>                             } else {<br>@@ -6569,9 +6569,9 @@<br>                                       res = ast_say_number(chan, tm.tm_sec, ints, lang, NULL);<br>                                      if (!res) {<br>                                           if (tm.tm_sec > 1) {<br>-                                                      res = wait_file(chan, ints, "digits/seconds", lang);<br>+                                                       res = wait_file(chan, ints, "seconds", lang);<br>                                               } else {<br>-                                                     res = wait_file(chan, ints, "digits/second", lang);<br>+                                                        res = wait_file(chan, ints, "second", lang);<br>                                                }<br>                                     }<br>                             } else {<br>@@ -6785,7 +6785,7 @@<br>                                       }<br>                             }<br>                             if (!res) {<br>-                                  res = wait_file(chan, ints, "digits/minute", lang);<br>+                                        res = wait_file(chan, ints, "minute", lang);<br>                                }<br>                             break;<br>                        case 'P':<br>@@ -6869,7 +6869,7 @@<br>                                      }<br>                             }<br>                             if (!res) {<br>-                                  res = wait_file(chan, ints, "digits/second", lang);<br>+                                        res = wait_file(chan, ints, "second", lang);<br>                                }<br>                             break;<br>                        case 'T':<br>@@ -7024,7 +7024,7 @@<br>          if (tm.tm_min > 0) {<br>                   res = ast_say_number(chan, tm.tm_min, ints, lang, "f");<br>                     if (!res)<br>-                            res = ast_streamfile(chan, "digits/minute", lang);<br>+                         res = ast_streamfile(chan, "minute", lang);<br>                 }<br>     return res;<br> }<br>@@ -7119,9 +7119,9 @@<br>                        res = ast_say_number(chan, tm.tm_min, ints, lang, (char *) NULL);<br>             if (!res) {<br>                   if (tm.tm_min > 1)<br>-                                res = wait_file(chan, ints, "digits/minutes", lang);<br>+                               res = wait_file(chan, ints, "minutes", lang);<br>                       else<br>-                         res = wait_file(chan, ints, "digits/minute", lang);<br>+                                res = wait_file(chan, ints, "minute", lang);<br>                }<br>     }<br>     return res;<br>@@ -7181,7 +7181,7 @@<br>    if (!res)<br>             res = ast_say_number(chan, tm.tm_min, ints, lang, (char *) NULL);<br>     if (!res)<br>-            res = ast_streamfile(chan, "digits/minute", lang);<br>+         res = ast_streamfile(chan, "minute", lang);<br>         if (!res)<br>             res = ast_waitstream(chan, ints);<br>     return res;<br>@@ -7604,7 +7604,7 @@<br>    if (!res)<br>             res = ast_say_number(chan, tm.tm_min, ints, lang, (char *) NULL);<br>     if (!res)<br>-            res = ast_streamfile(chan, "digits/minute", lang);<br>+         res = ast_streamfile(chan, "minute", lang);<br>         if (!res)<br>             res = ast_waitstream(chan, ints);<br>     return res;<br>@@ -8482,7 +8482,7 @@<br>                    if (!res)<br>                             res = ast_say_number_full_gr(chan, tm.tm_sec, ints, lang, -1, -1);<br>                    if (!res)<br>-                            ast_copy_string(nextmsg, "digits/seconds", sizeof(nextmsg));<br>+                               ast_copy_string(nextmsg, "seconds", sizeof(nextmsg));<br>                       res = wait_file(chan, ints, nextmsg, lang);<br>                   break;<br>                case 'T':<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6025">change 6025</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6025"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I05d9d4bee6a7237030530a46e7eb3df15f13f702 </div>
<div style="display:none"> Gerrit-Change-Number: 6025 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Rusty Newton <rnewton@digium.com> </div>