1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-03-13 20:50:41 +00:00

FS-5290 --resolve

This commit is contained in:
Jeff Lenk 2013-04-10 17:43:27 -05:00 committed by Travis Cross
parent 4fc4f7495e
commit 55ff737e57
2 changed files with 13 additions and 11 deletions
src/mod
applications/mod_sms
dialplans/mod_dialplan_xml

@ -72,15 +72,16 @@ typedef enum {
} break_t; } break_t;
#define check_tz() tzoff = switch_event_get_header(event, "tod_tz_offset"); \ #define check_tz() \
tzname = switch_event_get_header(event, "timezone"); \
do { \ do { \
tzoff = switch_event_get_header(event, "tod_tz_offset"); \
tzname = switch_event_get_header(event, "timezone"); \
if (!zstr(tzoff) && switch_is_number(tzoff)) { \ if (!zstr(tzoff) && switch_is_number(tzoff)) { \
offset = atoi(tzoff); \ offset = atoi(tzoff); \
break; \
} else { \ } else { \
tzoff = NULL; \ tzoff = NULL; \
} \ } \
break; \
} while(tzoff) } while(tzoff)
static int parse_exten(switch_event_t *event, switch_xml_t xexten, switch_event_t **extension) static int parse_exten(switch_event_t *event, switch_xml_t xexten, switch_event_t **extension)
@ -259,7 +260,7 @@ static int parse_exten(switch_event_t *event, switch_xml_t xexten, switch_event_
if (field && strchr(expression, '(')) { if (field && strchr(expression, '(')) {
len = (uint32_t) (strlen(data) + strlen(field_data) + 10) * proceed; len = (uint32_t) (strlen(data) + strlen(field_data) + 10) * proceed;
if (!(substituted = malloc(len))) { if (!(substituted = (char *) malloc(len))) {
abort(); abort();
} }
memset(substituted, 0, len); memset(substituted, 0, len);

@ -83,15 +83,16 @@ static switch_status_t exec_app(switch_core_session_t *session, const char *app,
#define RECUR_SPACE 4 #define RECUR_SPACE 4
#define MAX_RECUR_SPACE 100 * RECUR_SPACE #define MAX_RECUR_SPACE 100 * RECUR_SPACE
#define check_tz() tzoff = switch_channel_get_variable(channel, "tod_tz_offset"); \ #define check_tz() \
tzname = switch_channel_get_variable(channel, "timezone"); \
do { \ do { \
tzoff = switch_event_get_header((switch_event_t *)channel, "tod_tz_offset"); \
tzname = switch_event_get_header((switch_event_t *)channel, "timezone"); \
if (!zstr(tzoff) && switch_is_number(tzoff)) { \ if (!zstr(tzoff) && switch_is_number(tzoff)) { \
offset = atoi(tzoff); \ offset = atoi(tzoff); \
break; \
} else { \ } else { \
tzoff = NULL; \ tzoff = NULL; \
} \ } \
break; \
} while(tzoff) } while(tzoff)
static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *caller_profile, switch_xml_t xexten, static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *caller_profile, switch_xml_t xexten,