Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
3ff0aaa0
提交
3ff0aaa0
authored
1月 06, 2014
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-5653 --resolve
上级
9efe9804
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
3 行删除
+14
-3
fs_cli.c
libs/esl/fs_cli.c
+14
-3
没有找到文件。
libs/esl/fs_cli.c
浏览文件 @
3ff0aaa0
...
...
@@ -85,6 +85,8 @@ static int running = 1;
static
int
thread_running
=
0
;
static
char
*
filter_uuid
;
static
char
*
logfilter
;
static
int
timeout
=
0
;
static
int
connect_timeout
=
0
;
#ifndef WIN32
static
EditLine
*
el
;
static
History
*
myhistory
;
...
...
@@ -603,6 +605,7 @@ static const char *usage_str =
" -d, --debug=level Debug Level (0 - 7)
\n
"
" -b, --batchmode Batch mode
\n
"
" -t, --timeout Timeout for API commands (in miliseconds)
\n
"
" -T, --connect-timeout Timeout for socket connection (in miliseconds)
\n
"
" -n, --no-color Disable color
\n\n
"
;
static
int
usage
(
char
*
name
){
...
...
@@ -1249,6 +1252,10 @@ static void read_config(const char *dft_cfile, const char *cfile) {
profiles
[
pcount
-
1
].
console_fnkeys
[
i
-
1
]
=
strdup
(
val
);
}
}
}
else
if
(
!
strcasecmp
(
var
,
"timeout"
))
{
timeout
=
atoi
(
val
);
}
else
if
(
!
strcasecmp
(
var
,
"connect-timeout"
))
{
connect_timeout
=
atoi
(
val
);
}
}
esl_config_close_file
(
&
cfg
);
...
...
@@ -1301,6 +1308,7 @@ int main(int argc, char *argv[])
{
"interrupt"
,
0
,
0
,
'i'
},
{
"reconnect"
,
0
,
0
,
'R'
},
{
"timeout"
,
1
,
0
,
't'
},
{
"connect-timeout"
,
1
,
0
,
'T'
},
{
0
,
0
,
0
,
0
}
};
char
temp_host
[
128
];
...
...
@@ -1319,7 +1327,7 @@ int main(int argc, char *argv[])
int
argv_log_uuid
=
0
;
int
argv_quiet
=
0
;
int
argv_batch
=
0
;
int
loops
=
2
,
reconnect
=
0
,
timeout
=
0
;
int
loops
=
2
,
reconnect
=
0
;
char
*
ccheck
;
#ifdef WIN32
...
...
@@ -1354,7 +1362,7 @@ int main(int argc, char *argv[])
esl_global_set_default_logger
(
6
);
/* default debug level to 6 (info) */
for
(;;)
{
int
option_index
=
0
;
opt
=
getopt_long
(
argc
,
argv
,
"H:P:S:u:p:d:x:l:Ut:qrRhib?n"
,
options
,
&
option_index
);
opt
=
getopt_long
(
argc
,
argv
,
"H:P:S:u:p:d:x:l:Ut:
T:
qrRhib?n"
,
options
,
&
option_index
);
if
(
opt
==
-
1
)
break
;
switch
(
opt
)
{
case
'H'
:
...
...
@@ -1418,6 +1426,9 @@ int main(int argc, char *argv[])
case
't'
:
timeout
=
atoi
(
optarg
);
break
;
case
'T'
:
connect_timeout
=
atoi
(
optarg
);
break
;
case
'h'
:
case
'?'
:
print_banner
(
stdout
,
is_color
);
...
...
@@ -1488,7 +1499,7 @@ int main(int argc, char *argv[])
connected
=
0
;
while
(
--
loops
>
0
)
{
memset
(
&
handle
,
0
,
sizeof
(
handle
));
if
(
esl_connect
(
&
handle
,
profile
->
host
,
profile
->
port
,
profile
->
user
,
profile
->
pass
))
{
if
(
esl_connect
_timeout
(
&
handle
,
profile
->
host
,
profile
->
port
,
profile
->
user
,
profile
->
pass
,
connect_timeout
))
{
esl_global_set_default_logger
(
7
);
esl_log
(
ESL_LOG_ERROR
,
"Error Connecting [%s]
\n
"
,
handle
.
err
);
if
(
loops
==
1
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论