]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't hide status in macro, use switch_snprintf to get null terminated string.
authorMichael Jerris <mike@jerris.com>
Wed, 12 Dec 2007 22:38:01 +0000 (22:38 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 12 Dec 2007 22:38:01 +0000 (22:38 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6709 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/say/mod_say_de/mod_say_de.c
src/mod/say/mod_say_en/mod_say_en.c
src/mod/say/mod_say_es/mod_say_es.c
src/mod/say/mod_say_fr/mod_say_fr.c
src/mod/say/mod_say_it/mod_say_it.c
src/mod/say/mod_say_nl/mod_say_nl.c

index 674d3b24c76c30605acdafed054b5e2b12263ba7..250c2da7ee20fdb45b59a8134d87907d4d3d8209 100644 (file)
@@ -53,18 +53,18 @@ SWITCH_MODULE_DEFINITION(mod_say_de, mod_say_de_load, NULL, NULL);
 
 #define say_num(num, t) {                                                      \
                char tmp[80];\
-               switch_status_t status;\
-               snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                                \
-       if ((status = de_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-               return status;\
+               switch_status_t tstatus;\
+               switch_snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                         \
+       if ((tstatus = de_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
+               return tstatus;\
        }}\
 
 #define say_file(...) {\
                char tmp[80];\
-               switch_status_t status;\
-               snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-               if ((status = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                       return status;\
+               switch_status_t tstatus;\
+               switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
+               if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
+                       return tstatus;\
                }\
                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
                        return SWITCH_STATUS_FALSE;\
index 8e789041decafbf64d9b24746ea480dfcc0356db..c78b8eb25f062ef7680347d768816207c76a39e5 100644 (file)
@@ -53,18 +53,18 @@ SWITCH_MODULE_DEFINITION(mod_say_en, mod_say_en_load, NULL, NULL);
 
 #define say_num(num, t) {                                                      \
                char tmp[80];\
-               switch_status_t status;\
+               switch_status_t tstatus;\
                switch_snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                         \
-       if ((status = en_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-               return status;\
+       if ((tstatus = en_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
+               return tstatus;\
        }}\
 
 #define say_file(...) {\
                char tmp[80];\
-               switch_status_t status;\
+               switch_status_t tstatus;\
                switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-               if ((status = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                       return status;\
+               if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
+                       return tstatus;\
                }\
                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
                        return SWITCH_STATUS_FALSE;\
index 4d1dcd017a8a5ce21bf146493d682ec520950ea5..4e0502cb20ecd16a1db1c7e9fd88b09c4ef2b065 100644 (file)
@@ -53,18 +53,18 @@ SWITCH_MODULE_DEFINITION(mod_say_es, mod_say_es_load, NULL, NULL);
 
 #define say_num(num, t) {                                                      \
                char tmp[80];\
-               switch_status_t status;\
-               snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                                \
-       if ((status = es_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-               return status;\
+               switch_status_t tstatus;\
+               switch_snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                         \
+       if ((tstatus = es_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
+               return tstatus;\
        }}\
 
 #define say_file(...) {\
                char tmp[80];\
-               switch_status_t status;\
-               snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-               if ((status = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                       return status;\
+               switch_status_t tstatus;\
+               switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
+               if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
+                       return tstatus;\
                }\
                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
                        return SWITCH_STATUS_FALSE;\
index 955d867ef934a34e6012d3d44e80cdfe44297af3..f6d7c5cc6e24c57661bb01db264afb48856376b4 100644 (file)
@@ -53,18 +53,18 @@ SWITCH_MODULE_DEFINITION(mod_say_fr, mod_say_fr_load, NULL, NULL);
 
 #define say_num(num, t) {                                                      \
                char tmp[80];\
-               switch_status_t status;\
-               snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                                \
-       if ((status = fr_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-               return status;\
+               switch_status_t tstatus;\
+               switch_snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                         \
+       if ((tstatus = fr_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
+               return tstatus;\
        }}\
 
 #define say_file(...) {\
                char tmp[80];\
-               switch_status_t status;\
-               snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-               if ((status = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                       return status;\
+               switch_status_t tstatus;\
+               switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
+               if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
+                       return tstatus;\
                }\
                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
                        return SWITCH_STATUS_FALSE;\
index 22817521515aeb4c32448621a7c64ededb1a6f43..53764f0c50d5d59279d88d3dfc96d740a8f5e513 100644 (file)
@@ -53,18 +53,18 @@ SWITCH_MODULE_DEFINITION(mod_say_it, mod_say_it_load, NULL, NULL);
 
 #define say_num(num, t) {                                                      \
                char tmp[80];\
-               switch_status_t status;\
-               snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                                \
-       if ((status = it_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-               return status;\
+               switch_status_t tstatus;\
+               switch_snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                         \
+       if ((tstatus = it_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
+               return tstatus;\
        }}\
 
 #define say_file(...) {\
                char tmp[80];\
-               switch_status_t status;\
-               snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-               if ((status = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                       return status;\
+               switch_status_t tstatus;\
+               switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
+               if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
+                       return tstatus;\
                }\
                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
                        return SWITCH_STATUS_FALSE;\
index 82c5d491f1f9c933012a10e4415445e9edf2ce00..8c0b6412cb57b8dd73f8b04e46548db5c7037cba 100644 (file)
@@ -53,18 +53,18 @@ SWITCH_MODULE_DEFINITION(mod_say_nl, mod_say_nl_load, NULL, NULL);
 
 #define say_num(num, t) {                                                      \
                char tmp[80];\
-               switch_status_t status;\
-               snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                                \
-       if ((status = nl_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
-               return status;\
+               switch_status_t tstatus;\
+               switch_snprintf(tmp, sizeof(tmp), "%u", (unsigned)num);                         \
+       if ((tstatus = nl_say_general_count(session, tmp, SST_ITEMS, t, args)) != SWITCH_STATUS_SUCCESS) {\
+               return tstatus;\
        }}\
 
 #define say_file(...) {\
                char tmp[80];\
-               switch_status_t status;\
-               snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
-               if ((status = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
-                       return status;\
+               switch_status_t tstatus;\
+               switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__);\
+               if ((tstatus = switch_ivr_play_file(session, NULL, tmp, args)) != SWITCH_STATUS_SUCCESS){ \
+                       return tstatus;\
                }\
                if (!switch_channel_ready(switch_core_session_get_channel(session))) {\
                        return SWITCH_STATUS_FALSE;\