FS-2216 partial with renaming

This commit is contained in:
Jeff Lenk committed 2012-01-08 14:19:16 -06:00
1 parent bcf7d477e2
commit 24288832b1
16 files changed
+52 -67

No files matched your search

@@ -6375,7 +6375,7 @@ SWITCH_STANDARD_APP(conference_function)
uint32_t max_members_val;
errno = 0; /* sanity first */
max_members_val = strtol(max_members_str, NULL, 0); /* base 0 lets 0x... for hex 0... for octal and base 10 otherwise through */
if (errno == ERANGE || errno == EINVAL || max_members_val < 0 || max_members_val == 1) {
if (errno == ERANGE || errno == EINVAL || (int32_t) max_members_val < 0 || max_members_val == 1) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"conference_max_members variable %s is invalid, not setting a limit\n", max_members_str);
} else {
@@ -7106,7 +7106,7 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
} else if (!strcasecmp(var, "max-members") && !zstr(val)) {
errno = 0; /* sanity first */
max_members = strtol(val, NULL, 0); /* base 0 lets 0x... for hex 0... for octal and base 10 otherwise through */
if (errno == ERANGE || errno == EINVAL || max_members < 0 || max_members == 1) {
if (errno == ERANGE || errno == EINVAL || (int32_t) max_members < 0 || max_members == 1) {
/* a negative wont work well, and its foolish to have a conference limited to 1 person unless the outbound
* stuff is added, see comments above
*/
+1 -1
View File
@@ -597,7 +597,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_db_load)
switch_api_interface_t *commands_api_interface;
switch_limit_interface_t *limit_interface;
memset(&globals, 0, sizeof(&globals));
memset(&globals, 0, sizeof(globals));
strncpy(globals.hostname, switch_core_get_switchname(), sizeof(globals.hostname));
globals.pool = pool;
+8 -30
View File
@@ -340,18 +340,13 @@ static void bind_to_session(switch_core_session_t *session,
uint32_t digit_timeout = 1500;
uint32_t input_timeout = 0;
const char *var;
uint32_t tmp;
if ((var = switch_channel_get_variable(channel, "bind_digit_digit_timeout"))) {
tmp = (uint32_t) atol(var);
if (tmp < 0) tmp = 0;
digit_timeout = tmp;
digit_timeout = switch_atoul(var);
}
if ((var = switch_channel_get_variable(channel, "bind_digit_input_timeout"))) {
tmp = (uint32_t) atol(var);
if (tmp < 0) tmp = 0;
input_timeout = tmp;
input_timeout = switch_atoul(var);
}
switch_ivr_dmachine_create(&dmachine, "DPTOOLS", NULL, digit_timeout, input_timeout, NULL, digit_nomatch_action_callback, session);
@@ -2217,10 +2212,7 @@ SWITCH_STANDARD_APP(read_function)
}
if (argc > 6) {
digit_timeout = atoi(argv[6]);
if (digit_timeout < 0) {
digit_timeout = 0;
}
digit_timeout = switch_atoui(argv[6]);
}
if (min_digits <= 1) {
@@ -2303,10 +2295,7 @@ SWITCH_STANDARD_APP(play_and_get_digits_function)
}
if (argc > 9) {
digit_timeout = atoi(argv[9]);
if (digit_timeout < 0) {
digit_timeout = 0;
}
digit_timeout = switch_atoui(argv[9]);
}
if (argc > 10) {
@@ -2589,25 +2578,16 @@ SWITCH_STANDARD_APP(record_function)
l++;
}
if (l) {
limit = atoi(l);
if (limit < 0) {
limit = 0;
}
limit = switch_atoui(l);
}
}
if (argv[2]) {
fh.thresh = atoi(argv[2]);
if (fh.thresh < 0) {
fh.thresh = 0;
}
fh.thresh = switch_atoui(argv[2]);
}
if (argv[3]) {
fh.silence_hits = atoi(argv[3]);
if (fh.silence_hits < 0) {
fh.silence_hits = 0;
}
fh.silence_hits = switch_atoui(argv[3]);
}
if ((tmp = switch_channel_get_variable(channel, "record_rate"))) {
@@ -3481,9 +3461,7 @@ SWITCH_STANDARD_APP(wait_for_silence_function)
listen_hits = atoi(argv[2]);
if (argv[3]) {
if ((timeout_ms = atoi(argv[3])) < 0) {
timeout_ms = 0;
}
timeout_ms = switch_atoui(argv[3]);
}
if (thresh > 0 && silence_hits > 0 && listen_hits > 0) {
+1 -1
View File
@@ -974,7 +974,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_hash_load)
switch_limit_interface_t *limit_interface;
switch_status_t status;
memset(&globals, 0, sizeof(&globals));
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
status = switch_event_reserve_subclass(LIMIT_EVENT_USAGE);