Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d413bcd7
提交
d413bcd7
authored
5月 21, 2015
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7567 #resolve #comment additional occurrences beyond the initial patch discovered
上级
38ab8a9b
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
22 行增加
和
17 行删除
+22
-17
switch_ivr.h
src/include/switch_ivr.h
+1
-0
switch_core_memory.c
src/switch_core_memory.c
+0
-1
switch_ivr.c
src/switch_ivr.c
+5
-3
switch_ivr_async.c
src/switch_ivr_async.c
+16
-9
switch_log.c
src/switch_log.c
+0
-2
switch_nat.c
src/switch_nat.c
+0
-1
switch_scheduler.c
src/switch_scheduler.c
+0
-1
没有找到文件。
src/include/switch_ivr.h
浏览文件 @
d413bcd7
...
...
@@ -60,6 +60,7 @@ SWITCH_BEGIN_EXTERN_C struct switch_unicast_conninfo {
int
type
;
int
transport
;
int
stream_id
;
switch_thread_t
*
thread
;
};
typedef
struct
switch_unicast_conninfo
switch_unicast_conninfo_t
;
...
...
src/switch_core_memory.c
浏览文件 @
d413bcd7
...
...
@@ -662,7 +662,6 @@ switch_memory_pool_t *switch_core_memory_init(void)
switch_queue_create
(
&
memory_manager
.
pool_recycle_queue
,
50000
,
memory_manager
.
memory_pool
);
switch_threadattr_create
(
&
thd_attr
,
memory_manager
.
memory_pool
);
switch_threadattr_detach_set
(
thd_attr
,
0
);
switch_threadattr_stacksize_set
(
thd_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_thread_create
(
&
pool_thread_p
,
thd_attr
,
pool_thread
,
NULL
,
memory_manager
.
memory_pool
);
...
...
src/switch_ivr.c
浏览文件 @
d413bcd7
...
...
@@ -348,14 +348,12 @@ static void *SWITCH_THREAD_FUNC unicast_thread_run(switch_thread_t *thread, void
static
void
unicast_thread_launch
(
switch_unicast_conninfo_t
*
conninfo
)
{
switch_thread_t
*
thread
;
switch_threadattr_t
*
thd_attr
=
NULL
;
switch_threadattr_create
(
&
thd_attr
,
switch_core_session_get_pool
(
conninfo
->
session
));
switch_threadattr_detach_set
(
thd_attr
,
1
);
switch_threadattr_stacksize_set
(
thd_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_set_flag_locked
(
conninfo
,
SUF_THREAD_RUNNING
);
switch_thread_create
(
&
thread
,
thd_attr
,
unicast_thread_run
,
conninfo
,
switch_core_session_get_pool
(
conninfo
->
session
));
switch_thread_create
(
&
conninfo
->
thread
,
thd_attr
,
unicast_thread_run
,
conninfo
,
switch_core_session_get_pool
(
conninfo
->
session
));
}
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_deactivate_unicast
(
switch_core_session_t
*
session
)
...
...
@@ -369,9 +367,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_deactivate_unicast(switch_core_sessio
}
if
((
conninfo
=
switch_channel_get_private
(
channel
,
"unicast"
)))
{
switch_status_t
st
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"Shutting down unicast connection
\n
"
);
switch_clear_flag_locked
(
conninfo
,
SUF_READY
);
switch_socket_shutdown
(
conninfo
->
socket
,
SWITCH_SHUTDOWN_READWRITE
);
switch_thread_join
(
&
st
,
conninfo
->
thread
);
while
(
switch_test_flag
(
conninfo
,
SUF_THREAD_RUNNING
))
{
switch_yield
(
10000
);
if
(
++
sanity
>=
10000
)
{
...
...
src/switch_ivr_async.c
浏览文件 @
d413bcd7
...
...
@@ -4012,6 +4012,7 @@ struct speech_thread_handle {
switch_mutex_t
*
mutex
;
switch_thread_cond_t
*
cond
;
switch_memory_pool_t
*
pool
;
switch_thread_t
*
thread
;
int
ready
;
};
...
...
@@ -4175,24 +4176,30 @@ static switch_bool_t speech_callback(switch_media_bug_t *bug, void *user_data, s
frame
.
buflen
=
SWITCH_RECOMMENDED_BUFFER_SIZE
;
switch
(
type
)
{
case
SWITCH_ABC_TYPE_INIT
:
{
switch_thread_t
*
thread
;
case
SWITCH_ABC_TYPE_INIT
:
{
switch_threadattr_t
*
thd_attr
=
NULL
;
switch_threadattr_create
(
&
thd_attr
,
sth
->
pool
);
switch_threadattr_detach_set
(
thd_attr
,
1
);
switch_threadattr_stacksize_set
(
thd_attr
,
SWITCH_THREAD_STACKSIZE
);
switch_thread_create
(
&
thread
,
thd_attr
,
speech_thread
,
sth
,
sth
->
pool
);
switch_thread_create
(
&
sth
->
thread
,
thd_attr
,
speech_thread
,
sth
,
sth
->
pool
);
}
break
;
case
SWITCH_ABC_TYPE_CLOSE
:{
case
SWITCH_ABC_TYPE_CLOSE
:
{
switch_status_t
st
;
switch_core_asr_close
(
sth
->
ah
,
&
flags
);
if
(
sth
->
mutex
&&
sth
->
cond
&&
sth
->
ready
)
{
switch_mutex_lock
(
sth
->
mutex
);
if
(
switch_mutex_trylock
(
sth
->
mutex
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_thread_cond_signal
(
sth
->
cond
);
switch_mutex_unlock
(
sth
->
mutex
);
}
}
switch_thread_join
(
&
st
,
sth
->
thread
);
}
break
;
case
SWITCH_ABC_TYPE_READ
:
if
(
sth
->
ah
)
{
...
...
src/switch_log.c
浏览文件 @
d413bcd7
...
...
@@ -512,8 +512,6 @@ SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool, swit
LOG_POOL
=
pool
;
switch_threadattr_create
(
&
thd_attr
,
LOG_POOL
);
switch_threadattr_detach_set
(
thd_attr
,
1
);
switch_queue_create
(
&
LOG_QUEUE
,
SWITCH_CORE_QUEUE_LEN
,
LOG_POOL
);
#ifdef SWITCH_LOG_RECYCLE
...
...
src/switch_nat.c
浏览文件 @
d413bcd7
...
...
@@ -365,7 +365,6 @@ SWITCH_DECLARE(void) switch_nat_thread_start(void)
}
switch_threadattr_create
(
&
thd_attr
,
nat_globals_perm
.
pool
);
switch_threadattr_detach_set
(
thd_attr
,
1
);
switch_thread_create
(
&
nat_thread_p
,
thd_attr
,
switch_nat_multicast_runtime
,
NULL
,
nat_globals_perm
.
pool
);
}
...
...
src/switch_scheduler.c
浏览文件 @
d413bcd7
...
...
@@ -335,7 +335,6 @@ SWITCH_DECLARE(void) switch_scheduler_task_thread_start(void)
switch_mutex_init
(
&
globals
.
task_mutex
,
SWITCH_MUTEX_NESTED
,
globals
.
memory_pool
);
switch_queue_create
(
&
globals
.
event_queue
,
250000
,
globals
.
memory_pool
);
switch_threadattr_detach_set
(
thd_attr
,
1
);
switch_thread_create
(
&
task_thread_p
,
thd_attr
,
switch_scheduler_task_thread
,
NULL
,
globals
.
memory_pool
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论