mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-01 19:20:05 +00:00
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");
|
stream->write_function(stream, "parameter missing\n");
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
mss = atol(cmd);
|
mss = atol(cmd);
|
||||||
|
|
||||||
|
if (mss > 10000) {
|
||||||
|
mss = 10000;
|
||||||
|
}
|
||||||
|
|
||||||
if ((p = strchr(cmd, ' '))) {
|
if ((p = strchr(cmd, ' '))) {
|
||||||
max = atoi(p+1);
|
max = atoi(p+1);
|
||||||
if (max < 0) {
|
if (max < 0) {
|
||||||
max = 10;
|
max = 1;
|
||||||
|
} else if (max > 100) {
|
||||||
|
max = 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user