Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
30899013
提交
30899013
authored
4月 30, 2013
作者:
Brian West
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix stop the correct way
上级
2ad0e712
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
5 行增加
和
11 行删除
+5
-11
mod_local_stream.c
src/mod/formats/mod_local_stream/mod_local_stream.c
+5
-11
没有找到文件。
src/mod/formats/mod_local_stream/mod_local_stream.c
浏览文件 @
30899013
...
...
@@ -87,7 +87,6 @@ struct local_stream_source {
switch_thread_rwlock_t
*
rwlock
;
int
ready
;
int
stopped
;
int
stop_request
;
int
part_reload
;
int
full_reload
;
int
chime_freq
;
...
...
@@ -168,7 +167,7 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
switch_yield
(
1000000
);
while
(
RUNNING
)
{
while
(
RUNNING
&&
!
source
->
stopped
)
{
switch_size_t
olen
;
uint8_t
abuf
[
SWITCH_RECOMMENDED_BUFFER_SIZE
]
=
{
0
};
...
...
@@ -223,7 +222,7 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
goto
done
;
}
while
(
RUNNING
)
{
while
(
RUNNING
&&
!
source
->
stopped
)
{
int
is_open
;
switch_file_handle_t
*
use_fh
=
&
fh
;
...
...
@@ -324,7 +323,7 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
switch_dir_close
(
source
->
dir_handle
);
source
->
dir_handle
=
NULL
;
if
(
source
->
stop_request
||
source
->
full_reload
)
{
if
(
source
->
full_reload
)
{
if
(
source
->
rwlock
&&
switch_thread_rwlock_trywrlock
(
source
->
rwlock
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Cannot stop local_stream://%s because it is in use.
\n
"
,
source
->
name
);
if
(
source
->
part_reload
)
{
...
...
@@ -372,10 +371,6 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"local_stream://%s partially reloaded.
\n
"
,
source
->
name
);
source
->
part_reload
=
0
;
}
}
else
if
(
source
->
stop_request
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"local_stream://%s stopped.
\n
"
,
source
->
name
);
source
->
stopped
=
1
;
goto
done
;
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"local_stream://%s fully reloaded.
\n
"
,
source
->
name
);
launch_streams
(
source
->
name
);
...
...
@@ -760,7 +755,7 @@ SWITCH_STANDARD_API(stop_local_stream_function)
goto
done
;
}
source
->
stop
_request
=
1
;
source
->
stop
ped
=
1
;
stream
->
write_function
(
stream
,
"+OK"
);
goto
done
;
...
...
@@ -839,7 +834,7 @@ SWITCH_STANDARD_API(show_local_stream_function)
stream
->
write_function
(
stream
,
" total: %d
\n
"
,
source
->
total
);
stream
->
write_function
(
stream
,
" shuffle: %s
\n
"
,
(
source
->
shuffle
)
?
"true"
:
"false"
);
stream
->
write_function
(
stream
,
" ready: %s
\n
"
,
(
source
->
ready
)
?
"true"
:
"false"
);
stream
->
write_function
(
stream
,
" stopp
ing: %s
\n
"
,
(
source
->
stop_request
)
?
"true"
:
"false"
);
stream
->
write_function
(
stream
,
" stopp
ed: %s
\n
"
,
(
source
->
stopped
)
?
"true"
:
"false"
);
stream
->
write_function
(
stream
,
" reloading: %s
\n
"
,
(
source
->
full_reload
)
?
"true"
:
"false"
);
}
}
else
{
...
...
@@ -888,7 +883,6 @@ SWITCH_STANDARD_API(start_local_stream_function)
switch_mutex_unlock
(
globals
.
mutex
);
if
(
source
)
{
source
->
stopped
=
0
;
source
->
stop_request
=
0
;
stream
->
write_function
(
stream
,
"+OK stream: %s"
,
source
->
name
);
goto
done
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论