]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODAPP-380
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 17 Dec 2009 15:47:39 +0000 (15:47 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 17 Dec 2009 15:47:39 +0000 (15:47 +0000)
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
src/switch_core_sqldb.c

index 33a9bd6274c6829654236fa9c12f8d0fa2403f0b..e0a8435d01301fa735aff3d841c6e769d401646e 100644 (file)
@@ -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;
                }
index a990a34f5ca20fd05f18c3b700c0ccabe0c487d1..b70529e4a872f0f38fb27dde9df934dd487bb318 100644 (file)
@@ -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);
 }