FS-3229 --resolve

This commit is contained in:
Anthony Minessale
2011-04-04 18:50:46 -05:00
parent 6a70fa4c4d
commit 38c3a67a7e
3 changed files with 29 additions and 19 deletions
+11 -4
View File
@@ -1552,7 +1552,8 @@ SWITCH_STANDARD_APP(tone_detect_session_function)
int argc;
char *mydata = NULL;
time_t to = 0;
int hits = 1;
int hits = 0;
const char *hp = NULL;
if (zstr(data) || !(mydata = switch_core_session_strdup(session, data))) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID ARGS!\n");
@@ -1582,10 +1583,16 @@ SWITCH_STANDARD_APP(tone_detect_session_function)
}
}
if (argv[6]) {
hits = atoi(argv[6]);
if (argv[4] && argv[5]) {
hp = argv[6];
} else if (argv[4] && !argv[6]) {
hp = argv[4];
}
if (hp) {
hits = atoi(hp);
if (hits < 0) {
hits = 1;
hits = 0;
}
}