[Freeswitch-svn] [commit] r6709 - in freeswitch/trunk/src/mod/say: mod_say_de mod_say_en mod_say_es mod_say_fr mod_say_it mod_say_nl

Freeswitch SVN mikej at freeswitch.org
Wed Dec 12 17:38:02 EST 2007


Author: mikej
Date: Wed Dec 12 17:38:01 2007
New Revision: 6709

Modified:
   freeswitch/trunk/src/mod/say/mod_say_de/mod_say_de.c
   freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c
   freeswitch/trunk/src/mod/say/mod_say_es/mod_say_es.c
   freeswitch/trunk/src/mod/say/mod_say_fr/mod_say_fr.c
   freeswitch/trunk/src/mod/say/mod_say_it/mod_say_it.c
   freeswitch/trunk/src/mod/say/mod_say_nl/mod_say_nl.c

Log:
don't hide status in macro, use switch_snprintf to get null terminated string.

Modified: freeswitch/trunk/src/mod/say/mod_say_de/mod_say_de.c
==============================================================================
--- freeswitch/trunk/src/mod/say/mod_say_de/mod_say_de.c	(original)
+++ freeswitch/trunk/src/mod/say/mod_say_de/mod_say_de.c	Wed Dec 12 17:38:01 2007
@@ -53,18 +53,18 @@
 
 #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;\

Modified: freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c
==============================================================================
--- freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c	(original)
+++ freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c	Wed Dec 12 17:38:01 2007
@@ -53,18 +53,18 @@
 
 #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;\

Modified: freeswitch/trunk/src/mod/say/mod_say_es/mod_say_es.c
==============================================================================
--- freeswitch/trunk/src/mod/say/mod_say_es/mod_say_es.c	(original)
+++ freeswitch/trunk/src/mod/say/mod_say_es/mod_say_es.c	Wed Dec 12 17:38:01 2007
@@ -53,18 +53,18 @@
 
 #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;\

Modified: freeswitch/trunk/src/mod/say/mod_say_fr/mod_say_fr.c
==============================================================================
--- freeswitch/trunk/src/mod/say/mod_say_fr/mod_say_fr.c	(original)
+++ freeswitch/trunk/src/mod/say/mod_say_fr/mod_say_fr.c	Wed Dec 12 17:38:01 2007
@@ -53,18 +53,18 @@
 
 #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;\

Modified: freeswitch/trunk/src/mod/say/mod_say_it/mod_say_it.c
==============================================================================
--- freeswitch/trunk/src/mod/say/mod_say_it/mod_say_it.c	(original)
+++ freeswitch/trunk/src/mod/say/mod_say_it/mod_say_it.c	Wed Dec 12 17:38:01 2007
@@ -53,18 +53,18 @@
 
 #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;\

Modified: freeswitch/trunk/src/mod/say/mod_say_nl/mod_say_nl.c
==============================================================================
--- freeswitch/trunk/src/mod/say/mod_say_nl/mod_say_nl.c	(original)
+++ freeswitch/trunk/src/mod/say/mod_say_nl/mod_say_nl.c	Wed Dec 12 17:38:01 2007
@@ -53,18 +53,18 @@
 
 #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;\



More information about the Freeswitch-svn mailing list