]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
say.c: Fix French time playback. (#42)
authorInterLinked1 <24227567+InterLinked1@users.noreply.github.com>
Tue, 2 May 2023 14:09:42 +0000 (09:09 -0500)
committerGitHub <noreply@github.com>
Tue, 2 May 2023 14:09:42 +0000 (08:09 -0600)
ast_waitstream was not called after ast_streamfile,
resulting in "o'clock" being skipped in French.

Additionally, the minute announcements should be
feminine.

Reported-by: Danny Lloyd
Resolves: #41
ASTERISK-30488

main/say.c

index 14e43dfff539aad4f71fd36e7ee06af12eb6b20f..300581afb763fbe10891ce2ad043e78a7b12e872 100644 (file)
@@ -7339,11 +7339,16 @@ int ast_say_time_fr(struct ast_channel *chan, time_t t, const char *ints, const
        ast_localtime(&when, &tm, NULL);
 
        res = ast_say_number(chan, tm.tm_hour, ints, lang, "f");
-       if (!res)
+       if (!res) {
                res = ast_streamfile(chan, "digits/oclock", lang);
+       }
+       if (!res) {
+               res = ast_waitstream(chan, ints);
+       }
        if (tm.tm_min) {
-               if (!res)
-               res = ast_say_number(chan, tm.tm_min, ints, lang, (char *) NULL);
+               if (!res) {
+                       res = ast_say_number(chan, tm.tm_min, ints, lang, "f");
+               }
        }
        return res;
 }