tweak time_Test to not take insane values
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11706 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
857efe3267
commit
8ab4e237d7
|
@ -55,12 +55,19 @@ SWITCH_STANDARD_API(time_test_function)
|
|||
stream->write_function(stream, "parameter missing\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
mss = atol(cmd);
|
||||
|
||||
if (mss > 10000) {
|
||||
mss = 10000;
|
||||
}
|
||||
|
||||
if ((p = strchr(cmd, ' '))) {
|
||||
max = atoi(p+1);
|
||||
if (max < 0) {
|
||||
max = 10;
|
||||
max = 1;
|
||||
} else if (max > 100) {
|
||||
max = 100;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue