Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9bbcabbb
提交
9bbcabbb
authored
5月 27, 2008
作者:
Michael Jerris
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
indent
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@8688
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
263b2266
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
21 行增加
和
21 行删除
+21
-21
switch.c
src/switch.c
+9
-9
switch_core_sqldb.c
src/switch_core_sqldb.c
+4
-4
switch_ivr_menu.c
src/switch_ivr_menu.c
+8
-8
没有找到文件。
src/switch.c
浏览文件 @
9bbcabbb
...
...
@@ -213,10 +213,10 @@ int main(int argc, char *argv[])
char
*
usageDesc
;
int
alt_dirs
=
0
;
int
known_opt
;
int
high_prio
=
0
;
int
high_prio
=
0
;
switch_core_flag_t
flags
=
SCF_USE_SQL
;
int
ret
;
switch_file_t
*
fd
;
switch_file_t
*
fd
;
switch_memory_pool_t
*
pool
=
NULL
;
usageDesc
=
"these are the optional arguments you can pass to freeswitch
\n
"
...
...
@@ -505,7 +505,7 @@ int main(int argc, char *argv[])
}
switch_core_setrlimits
();
#ifndef WIN32
if
(
runas_user
||
runas_group
)
{
if
(
change_user_group
(
runas_user
,
runas_group
)
<
0
)
{
...
...
@@ -526,12 +526,12 @@ int main(int argc, char *argv[])
apr_pool_create
(
&
pool
,
NULL
);
if
(
switch_file_open
(
&
fd
,
pid_path
,
SWITCH_FOPEN_WRITE
|
SWITCH_FOPEN_CREATE
,
SWITCH_FPROT_UREAD
|
SWITCH_FPROT_UWRITE
,
pool
)
!=
SWITCH_STATUS_SUCCESS
)
{
fprintf
(
stderr
,
"Cannot open pid file %s.
\n
"
,
pid_path
);
return
255
;
pid_path
,
SWITCH_FOPEN_WRITE
|
SWITCH_FOPEN_CREATE
,
SWITCH_FPROT_UREAD
|
SWITCH_FPROT_UWRITE
,
pool
)
!=
SWITCH_STATUS_SUCCESS
)
{
fprintf
(
stderr
,
"Cannot open pid file %s.
\n
"
,
pid_path
);
return
255
;
}
if
(
switch_file_lock
(
fd
,
SWITCH_FLOCK_EXCLUSIVE
|
SWITCH_FLOCK_NONBLOCK
)
!=
SWITCH_STATUS_SUCCESS
)
{
...
...
src/switch_core_sqldb.c
浏览文件 @
9bbcabbb
...
...
@@ -56,7 +56,7 @@ static switch_status_t switch_core_db_persistant_execute_trans(switch_core_db_t
retries
=
1000
;
}
again:
again:
while
(
begin_retries
>
0
)
{
again
=
0
;
...
...
@@ -107,7 +107,7 @@ static switch_status_t switch_core_db_persistant_execute_trans(switch_core_db_t
}
}
done:
done:
switch_core_db_exec
(
db
,
"end transaction"
,
NULL
,
NULL
,
NULL
);
...
...
@@ -293,7 +293,7 @@ static void core_event_handler(switch_event_t *event)
if
(
!
switch_strlen_zero
(
state
))
{
state_i
=
atoi
(
state
);
}
switch
(
state_i
)
{
case
CS_HANGUP
:
case
CS_DONE
:
...
...
@@ -474,7 +474,7 @@ void switch_core_sqldb_start(switch_memory_pool_t *pool)
}
switch_queue_create
(
&
sql_manager
.
sql_queue
,
SWITCH_SQL_QUEUE_LEN
,
sql_manager
.
memory_pool
);
switch_threadattr_create
(
&
thd_attr
,
sql_manager
.
memory_pool
);
switch_threadattr_detach_set
(
thd_attr
,
1
);
switch_threadattr_stacksize_set
(
thd_attr
,
SWITCH_THREAD_STACKSIZE
);
...
...
src/switch_ivr_menu.c
浏览文件 @
9bbcabbb
...
...
@@ -164,7 +164,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t ** new_me
menu
->
confirm_attempts
=
confirm_attempts
;
menu
->
inlen
=
digit_len
;
menu
->
max_failures
=
max_failures
;
menu
->
timeout
=
timeout
;
...
...
@@ -250,8 +250,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_free(switch_ivr_menu_t * s
if
(
stack
!=
NULL
&&
stack
->
pool
!=
NULL
)
{
if
(
switch_test_flag
(
stack
,
SWITCH_IVR_MENU_FLAG_STACK
)
&&
switch_test_flag
(
stack
,
SWITCH_IVR_MENU_FLAG_FREEPOOL
))
{
switch_memory_pool_t
*
pool
=
stack
->
pool
;
status
=
switch_core_destroy_memory_pool
(
&
pool
);
switch_memory_pool_t
*
pool
=
stack
->
pool
;
status
=
switch_core_destroy_memory_pool
(
&
pool
);
}
else
{
status
=
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -313,7 +313,7 @@ static switch_status_t play_and_collect(switch_core_session_t *session, switch_i
if
(
menu
->
confirm_key
)
{
ap
=
&
confirm_args
;
}
switch_ivr_phrase_macro
(
session
,
menu
->
confirm_macro
,
menu
->
buf
,
NULL
,
ap
);
if
(
menu
->
confirm_key
&&
*
buf
==
'\0'
)
{
...
...
@@ -398,17 +398,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
int
ok
=
0
;
char
substituted
[
1024
];
char
*
use_arg
=
ap
->
arg
;
if
(
ap
->
re
)
{
switch_regex_t
*
re
=
NULL
;
int
ovector
[
30
];
if
((
ok
=
switch_regex_perform
(
menu
->
buf
,
ap
->
bind
,
&
re
,
ovector
,
sizeof
(
ovector
)
/
sizeof
(
ovector
[
0
]))))
{
switch_perform_substitution
(
re
,
ok
,
ap
->
arg
,
menu
->
buf
,
substituted
,
sizeof
(
substituted
),
ovector
);
use_arg
=
substituted
;
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"action regex [%s] [%s] [%d]
\n
"
,
menu
->
buf
,
ap
->
bind
,
ok
);
switch_regex_safe_free
(
re
);
}
else
{
ok
=
!
strcmp
(
menu
->
buf
,
ap
->
bind
);
...
...
@@ -696,7 +696,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_
const
char
*
confirm_attempts
=
switch_xml_attr_soft
(
xml_menu
,
"confirm-attempts"
);
const
char
*
digit_len
=
switch_xml_attr_soft
(
xml_menu
,
"digit-len"
);
const
char
*
inter_timeout
=
switch_xml_attr_soft
(
xml_menu
,
"inter-digit-timeout"
);
switch_ivr_menu_t
*
menu
=
NULL
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"building menu '%s'
\n
"
,
menu_name
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论