From 6b2ad1d48d2c6b3e3477db7289be19fcb1c2aa84 Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Thu, 28 Feb 2019 14:53:36 -0500 Subject: [PATCH] FS-11636: [mod_say_de] fix SST_CURRENT_DATE_TIME FS-11636: [mod_say_en] fix SST_CURRENT_DATE_TIME --- src/mod/say/mod_say_de/mod_say_de.c | 10 +++++----- src/mod/say/mod_say_en/mod_say_en.c | 11 +++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/mod/say/mod_say_de/mod_say_de.c b/src/mod/say/mod_say_de/mod_say_de.c index 55f65c3241..3f0245aac2 100644 --- a/src/mod/say/mod_say_de/mod_say_de.c +++ b/src/mod/say/mod_say_de/mod_say_de.c @@ -384,6 +384,11 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay, break; } + if (say_date) { + say_dow = say_day = say_month = say_year = 1; + say_today = say_yesterday = 0; + } + if (say_today) { say_file("time/today.wav"); } @@ -408,11 +413,6 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay, say_num(tm.tm_year + 1900, SSM_PRONOUNCED_YEAR); } - if (say_date) { - say_dow = say_day = say_month = say_year = 1; - say_today = say_yesterday = 0; - } - if (say_time) { if (say_date || say_today || say_yesterday || say_dow) { say_file("time/at.wav"); diff --git a/src/mod/say/mod_say_en/mod_say_en.c b/src/mod/say/mod_say_en/mod_say_en.c index 426de61752..99c2a2b1ff 100644 --- a/src/mod/say/mod_say_en/mod_say_en.c +++ b/src/mod/say/mod_say_en/mod_say_en.c @@ -355,6 +355,11 @@ static switch_status_t en_say_time(switch_say_file_handle_t *sh, char *tosay, sw break; } + if (say_date) { + say_year = say_month = say_day = say_dow = 1; + say_today = say_yesterday = 0; + } + if (say_today) { switch_say_file(sh, "time/today"); } @@ -364,12 +369,6 @@ static switch_status_t en_say_time(switch_say_file_handle_t *sh, char *tosay, sw if (say_dow) { switch_say_file(sh, "time/day-%d", tm.tm_wday); } - - if (say_date) { - say_year = say_month = say_day = say_dow = 1; - say_today = say_yesterday = 0; - } - if (say_month) { switch_say_file(sh, "time/mon-%d", tm.tm_mon); }