diff --git a/src/mod/say/mod_say_fr/mod_say_fr.c b/src/mod/say/mod_say_fr/mod_say_fr.c index 07a6595d48..e795f674c9 100644 --- a/src/mod/say/mod_say_fr/mod_say_fr.c +++ b/src/mod/say/mod_say_fr/mod_say_fr.c @@ -401,6 +401,7 @@ static switch_status_t fr_say_money(switch_core_session_t *session, char *tosay, char sbuf[16] = ""; /* enough for 999,999,999,999.99 (w/o the commas or leading $) */ char *dollars = NULL; char *cents = NULL; + switch_status_t status; if (strlen(tosay) > 15 || !switch_strip_nonnumerics(tosay, sbuf, sizeof(sbuf)-1)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); @@ -428,7 +429,9 @@ static switch_status_t fr_say_money(switch_core_session_t *session, char *tosay, } /* Say dollar amount */ - fr_say_general_count(session, dollars, say_args, args); + if (( status = fr_say_general_count(session, dollars, say_args, args)) != SWITCH_STATUS_SUCCESS) { + return status; + } if (atoi(dollars) == 1) { say_file("currency/dollar.wav"); } else { @@ -440,7 +443,9 @@ static switch_status_t fr_say_money(switch_core_session_t *session, char *tosay, /* Say cents */ if (cents) { - fr_say_general_count(session, cents, say_args, args); + if (( status = fr_say_general_count(session, cents, say_args, args)) != SWITCH_STATUS_SUCCESS) { + return status; + } if (atoi(cents) == 1) { say_file("currency/cent.wav"); } else { diff --git a/src/mod/say/mod_say_hu/mod_say_hu.c b/src/mod/say/mod_say_hu/mod_say_hu.c index fa2912306b..6a830c6a98 100644 --- a/src/mod/say/mod_say_hu/mod_say_hu.c +++ b/src/mod/say/mod_say_hu/mod_say_hu.c @@ -357,6 +357,7 @@ static switch_status_t hu_say_money(switch_core_session_t *session, char *tosay, { char sbuf[16] = ""; char *forint; + switch_status_t status; if (strlen(tosay) > 15 || !switch_strip_nonnumerics(tosay, sbuf, sizeof(sbuf)-1)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); @@ -374,7 +375,9 @@ static switch_status_t hu_say_money(switch_core_session_t *session, char *tosay, forint++; } - hu_say_general_count(session, forint, say_args, args); + if (( status = hu_say_general_count(session, forint, say_args, args)) != SWITCH_STATUS_SUCCESS ) { + return status; + } say_file("currency/forint.wav"); return SWITCH_STATUS_SUCCESS; diff --git a/src/mod/say/mod_say_it/mod_say_it.c b/src/mod/say/mod_say_it/mod_say_it.c index 4b723545c4..11d2b4f0db 100644 --- a/src/mod/say/mod_say_it/mod_say_it.c +++ b/src/mod/say/mod_say_it/mod_say_it.c @@ -440,6 +440,7 @@ static switch_status_t it_say_money(switch_core_session_t *session, char *tosay, char sbuf[16] = ""; /* enough for 999,999,999,999.99 (w/o the commas or leading $) */ char *dollars = NULL; char *cents = NULL; + switch_status_t status; if (strlen(tosay) > 15 || !switch_strip_nonnumerics(tosay, sbuf, sizeof(sbuf)-1)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); @@ -467,7 +468,10 @@ static switch_status_t it_say_money(switch_core_session_t *session, char *tosay, } /* Say dollar amount */ - it_say_general_count(session, dollars, say_args, args); + if (( status = it_say_general_count(session, dollars, say_args, args) ) != SWITCH_STATUS_SUCCESS ) { + return status; + } + if (atoi(dollars) == 1) { say_file("currency/dollar.wav"); } else { @@ -479,7 +483,9 @@ static switch_status_t it_say_money(switch_core_session_t *session, char *tosay, /* Say cents */ if (cents) { - it_say_general_count(session, cents, say_args, args); + if (( status = it_say_general_count(session, cents, say_args, args) ) != SWITCH_STATUS_SUCCESS ) { + return status; + } if (atoi(cents) == 1) { say_file("currency/cent.wav"); } else { diff --git a/src/mod/say/mod_say_nl/mod_say_nl.c b/src/mod/say/mod_say_nl/mod_say_nl.c index a53390e4c5..f6dec530d1 100644 --- a/src/mod/say/mod_say_nl/mod_say_nl.c +++ b/src/mod/say/mod_say_nl/mod_say_nl.c @@ -321,6 +321,7 @@ static switch_status_t nl_say_money(switch_core_session_t *session, char *tosay, char sbuf[16] = ""; /* enough for 999,999,999,999.99 (w/o the commas or leading $) */ char *dollars = NULL; char *cents = NULL; + switch_status_t status; if (strlen(tosay) > 15 || !switch_strip_nonnumerics(tosay, sbuf, sizeof(sbuf)-1)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); @@ -348,7 +349,10 @@ static switch_status_t nl_say_money(switch_core_session_t *session, char *tosay, } /* Say dollar amount */ - nl_say_general_count(session, dollars, say_args, args); + if (( status = nl_say_general_count(session, dollars, say_args, args)) != SWITCH_STATUS_SUCCESS ) { + return status; + } + if (atoi(dollars) == 1) { say_file("currency/dollar.wav"); } else { @@ -360,7 +364,9 @@ static switch_status_t nl_say_money(switch_core_session_t *session, char *tosay, /* Say cents */ if (cents) { - nl_say_general_count(session, cents, say_args, args); + if (( status = nl_say_general_count(session, cents, say_args, args)) != SWITCH_STATUS_SUCCESS) { + return status; + } if (atoi(cents) == 1) { say_file("currency/cent.wav"); } else { diff --git a/src/mod/say/mod_say_th/mod_say_th.c b/src/mod/say/mod_say_th/mod_say_th.c index e1526a47ad..ac60b01d9a 100644 --- a/src/mod/say/mod_say_th/mod_say_th.c +++ b/src/mod/say/mod_say_th/mod_say_th.c @@ -423,6 +423,7 @@ static switch_status_t th_say_money(switch_core_session_t *session, char *tosay, char sbuf[16] = ""; /* enough for 999,999,999,999.99 (w/o the commas or leading $) */ char *dollars = NULL; char *cents = NULL; + switch_status_t status; if (strlen(tosay) > 15 || !switch_strip_nonnumerics(tosay, sbuf, sizeof(sbuf)-1)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); @@ -450,12 +451,17 @@ static switch_status_t th_say_money(switch_core_session_t *session, char *tosay, } /* Say dollar amount */ - th_say_general_count(session, dollars, say_args, args); + if (( status = th_say_general_count(session, dollars, say_args, args)) != SWITCH_STATUS_SUCCESS ) { + return status; + } + say_file("currency/dollar.wav"); /* Say cents */ if (cents) { - th_say_general_count(session, cents, say_args, args); + if (( status = th_say_general_count(session, cents, say_args, args)) != SWITCH_STATUS_SUCCESS ) { + return status; + } } else { say_file("digits/0.wav"); }