mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-15 05:48:33 +00:00
don't hide status in macro, use switch_snprintf to get null terminated string.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6709 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
504f1275db
commit
6a90d335fc
6 files changed
+46
-46
No files matched your search
@@ -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;\
|
||||
|
||||
Reference in new issue
Block a user