Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
2af0dc00
提交
2af0dc00
authored
5月 06, 2011
作者:
Giovanni Maruzzelli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
skypopen: let's bump the thread priorities, refined
上级
eb134140
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
13 行删除
+14
-13
mod_skypopen.c
src/mod/endpoints/mod_skypopen/mod_skypopen.c
+14
-13
没有找到文件。
src/mod/endpoints/mod_skypopen/mod_skypopen.c
浏览文件 @
2af0dc00
...
@@ -1733,7 +1733,7 @@ static switch_status_t load_config(int reload_type)
...
@@ -1733,7 +1733,7 @@ static switch_status_t load_config(int reload_type)
switch_threadattr_create
(
&
skypopen_api_thread_attr
,
skypopen_module_pool
);
switch_threadattr_create
(
&
skypopen_api_thread_attr
,
skypopen_module_pool
);
switch_threadattr_detach_set
(
skypopen_api_thread_attr
,
0
);
switch_threadattr_detach_set
(
skypopen_api_thread_attr
,
0
);
switch_threadattr_stacksize_set
(
skypopen_api_thread_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_threadattr_stacksize_set
(
skypopen_api_thread_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_threadattr_priority_increase
(
skypopen_api_thread_attr
);
//
switch_threadattr_priority_increase(skypopen_api_thread_attr);
switch_thread_create
(
&
globals
.
SKYPOPEN_INTERFACES
[
interface_id
].
skypopen_api_thread
,
switch_thread_create
(
&
globals
.
SKYPOPEN_INTERFACES
[
interface_id
].
skypopen_api_thread
,
skypopen_api_thread_attr
,
skypopen_do_skypeapi_thread
,
&
globals
.
SKYPOPEN_INTERFACES
[
interface_id
],
skypopen_api_thread_attr
,
skypopen_do_skypeapi_thread
,
&
globals
.
SKYPOPEN_INTERFACES
[
interface_id
],
skypopen_module_pool
);
skypopen_module_pool
);
...
@@ -1743,7 +1743,7 @@ static switch_status_t load_config(int reload_type)
...
@@ -1743,7 +1743,7 @@ static switch_status_t load_config(int reload_type)
switch_threadattr_create
(
&
skypopen_signaling_thread_attr
,
skypopen_module_pool
);
switch_threadattr_create
(
&
skypopen_signaling_thread_attr
,
skypopen_module_pool
);
switch_threadattr_detach_set
(
skypopen_signaling_thread_attr
,
0
);
switch_threadattr_detach_set
(
skypopen_signaling_thread_attr
,
0
);
switch_threadattr_stacksize_set
(
skypopen_signaling_thread_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_threadattr_stacksize_set
(
skypopen_signaling_thread_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_threadattr_priority_increase
(
skypopen_signaling_thread_attr
);
//
switch_threadattr_priority_increase(skypopen_signaling_thread_attr);
switch_thread_create
(
&
globals
.
SKYPOPEN_INTERFACES
[
interface_id
].
switch_thread_create
(
&
globals
.
SKYPOPEN_INTERFACES
[
interface_id
].
skypopen_signaling_thread
,
skypopen_signaling_thread_attr
,
skypopen_signaling_thread
,
skypopen_signaling_thread_attr
,
skypopen_signaling_thread_func
,
&
globals
.
SKYPOPEN_INTERFACES
[
interface_id
],
skypopen_module_pool
);
skypopen_signaling_thread_func
,
&
globals
.
SKYPOPEN_INTERFACES
[
interface_id
],
skypopen_module_pool
);
...
@@ -2170,7 +2170,8 @@ int dtmf_received(private_t *tech_pvt, char *value)
...
@@ -2170,7 +2170,8 @@ int dtmf_received(private_t *tech_pvt, char *value)
int
start_audio_threads
(
private_t
*
tech_pvt
)
int
start_audio_threads
(
private_t
*
tech_pvt
)
{
{
switch_threadattr_t
*
thd_attr
=
NULL
;
switch_threadattr_t
*
tcp_srv_thread_thd_attr
=
NULL
;
switch_threadattr_t
*
tcp_cli_thread_thd_attr
=
NULL
;
tech_pvt
->
begin_to_write
=
0
;
tech_pvt
->
begin_to_write
=
0
;
tech_pvt
->
begin_to_read
=
0
;
tech_pvt
->
begin_to_read
=
0
;
...
@@ -2196,13 +2197,13 @@ int start_audio_threads(private_t *tech_pvt)
...
@@ -2196,13 +2197,13 @@ int start_audio_threads(private_t *tech_pvt)
switch_core_timer_sync
(
&
tech_pvt
->
timer_write
);
switch_core_timer_sync
(
&
tech_pvt
->
timer_write
);
switch_threadattr_create
(
&
thd_attr
,
skypopen_module_pool
);
switch_threadattr_create
(
&
t
cp_srv_thread_t
hd_attr
,
skypopen_module_pool
);
switch_threadattr_detach_set
(
thd_attr
,
0
);
switch_threadattr_detach_set
(
t
cp_srv_thread_t
hd_attr
,
0
);
switch_threadattr_stacksize_set
(
thd_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_threadattr_stacksize_set
(
t
cp_srv_thread_t
hd_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_threadattr_priority_increase
(
thd_attr
);
switch_threadattr_priority_increase
(
t
cp_srv_thread_t
hd_attr
);
switch_mutex_lock
(
tech_pvt
->
mutex_thread_audio_srv
);
switch_mutex_lock
(
tech_pvt
->
mutex_thread_audio_srv
);
//DEBUGA_SKYPE("debugging_hangup srv lock\n", SKYPOPEN_P_LOG);
//DEBUGA_SKYPE("debugging_hangup srv lock\n", SKYPOPEN_P_LOG);
if
(
switch_thread_create
(
&
tech_pvt
->
tcp_srv_thread
,
thd_attr
,
skypopen_do_tcp_srv_thread
,
tech_pvt
,
skypopen_module_pool
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_thread_create
(
&
tech_pvt
->
tcp_srv_thread
,
t
cp_srv_thread_t
hd_attr
,
skypopen_do_tcp_srv_thread
,
tech_pvt
,
skypopen_module_pool
)
==
SWITCH_STATUS_SUCCESS
)
{
DEBUGA_SKYPE
(
"started tcp_srv_thread thread.
\n
"
,
SKYPOPEN_P_LOG
);
DEBUGA_SKYPE
(
"started tcp_srv_thread thread.
\n
"
,
SKYPOPEN_P_LOG
);
}
else
{
}
else
{
ERRORA
(
"failed to start tcp_srv_thread thread.
\n
"
,
SKYPOPEN_P_LOG
);
ERRORA
(
"failed to start tcp_srv_thread thread.
\n
"
,
SKYPOPEN_P_LOG
);
...
@@ -2213,13 +2214,13 @@ int start_audio_threads(private_t *tech_pvt)
...
@@ -2213,13 +2214,13 @@ int start_audio_threads(private_t *tech_pvt)
switch_mutex_unlock
(
tech_pvt
->
mutex_thread_audio_srv
);
switch_mutex_unlock
(
tech_pvt
->
mutex_thread_audio_srv
);
//DEBUGA_SKYPE("debugging_hangup srv unlock\n", SKYPOPEN_P_LOG);
//DEBUGA_SKYPE("debugging_hangup srv unlock\n", SKYPOPEN_P_LOG);
switch_threadattr_create
(
&
thd_attr
,
skypopen_module_pool
);
switch_threadattr_create
(
&
t
cp_cli_thread_t
hd_attr
,
skypopen_module_pool
);
switch_threadattr_detach_set
(
thd_attr
,
0
);
switch_threadattr_detach_set
(
t
cp_cli_thread_t
hd_attr
,
0
);
switch_threadattr_stacksize_set
(
thd_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_threadattr_stacksize_set
(
t
cp_cli_thread_t
hd_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_threadattr_priority_increase
(
thd_attr
);
switch_threadattr_priority_increase
(
t
cp_cli_thread_t
hd_attr
);
switch_mutex_lock
(
tech_pvt
->
mutex_thread_audio_cli
);
switch_mutex_lock
(
tech_pvt
->
mutex_thread_audio_cli
);
//DEBUGA_SKYPE("debugging_hangup cli lock\n", SKYPOPEN_P_LOG);
//DEBUGA_SKYPE("debugging_hangup cli lock\n", SKYPOPEN_P_LOG);
if
(
switch_thread_create
(
&
tech_pvt
->
tcp_cli_thread
,
thd_attr
,
skypopen_do_tcp_cli_thread
,
tech_pvt
,
skypopen_module_pool
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_thread_create
(
&
tech_pvt
->
tcp_cli_thread
,
t
cp_cli_thread_t
hd_attr
,
skypopen_do_tcp_cli_thread
,
tech_pvt
,
skypopen_module_pool
)
==
SWITCH_STATUS_SUCCESS
)
{
DEBUGA_SKYPE
(
"started tcp_cli_thread thread.
\n
"
,
SKYPOPEN_P_LOG
);
DEBUGA_SKYPE
(
"started tcp_cli_thread thread.
\n
"
,
SKYPOPEN_P_LOG
);
}
else
{
}
else
{
ERRORA
(
"failed to start tcp_cli_thread thread.
\n
"
,
SKYPOPEN_P_LOG
);
ERRORA
(
"failed to start tcp_cli_thread thread.
\n
"
,
SKYPOPEN_P_LOG
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论