提交 8ab4e237 authored 作者: Brian West's avatar Brian West

tweak time_Test to not take insane values

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11706 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 857efe32
...@@ -55,12 +55,19 @@ SWITCH_STANDARD_API(time_test_function) ...@@ -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;
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论