From 8aeed8399520befc6113fab76fe77a514926f30a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 17 Dec 2009 15:47:39 +0000 Subject: [PATCH] MODAPP-380 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15984 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/say/mod_say_en/mod_say_en.c | 23 ++++++++++++++--------- src/switch_core_sqldb.c | 3 +-- 2 files changed, 15 insertions(+), 11 deletions(-) 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 33a9bd6274..e0a8435d01 100644 --- a/src/mod/say/mod_say_en/mod_say_en.c +++ b/src/mod/say/mod_say_en/mod_say_en.c @@ -176,9 +176,22 @@ static switch_status_t en_say_general_count(switch_core_session_t *session, int in; int x = 0; int places[9] = { 0 }; - char sbuf[13] = ""; + char sbuf[128] = ""; switch_status_t status; + if (method == SSM_ITERATED) { + if ((tosay = strip_commas(tosay, sbuf, sizeof(sbuf)))) { + char *p; + for (p = tosay; p && *p; p++) { + say_file("digits/%c.wav", *p); + } + } else { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); + return SWITCH_STATUS_GENERR; + } + return SWITCH_STATUS_SUCCESS; + } + if (!(tosay = strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; @@ -207,14 +220,6 @@ static switch_status_t en_say_general_count(switch_core_session_t *session, return status; } break; - case SSM_ITERATED: - { - char *p; - for (p = tosay; p && *p; p++) { - say_file("digits/%c.wav", *p); - } - } - break; default: break; } diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index a990a34f5c..b70529e4a8 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -144,8 +144,7 @@ static void sql_close(time_t prune) } -SWITCH_DECLARE(void) switch_cache_db_flush_handles(void) -{ +SWITCH_DECLARE(void) switch_cache_db_flush_handles(void){ sql_close(switch_epoch_time_now(NULL) + SQL_CACHE_TIMEOUT + 1); }