Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-05-25 10:07:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
344a49918a88df33cf767fc8163cfde3f1e73289
344a4991
1 parent
fe4a23e9
fix #79: allow edge vhost to add or remove.
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
13 行增加
和
12 行删除
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_config.cpp
查看文件 @
344a499
...
...
@@ -867,18 +867,6 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
SrsConfDirective
*
old_vhost
=
old_root
->
get
(
"vhost"
,
vhost
);
SrsConfDirective
*
new_vhost
=
root
->
get
(
"vhost"
,
vhost
);
// mode, never supports reload.
// first, for the origin and edge role change is too complex.
// second, the vhosts in origin device group normally are all origin,
// they never change to edge sometimes.
// third, the origin or upnode device can always be restart,
// edge will retry and the users connected to edge are ok.
if
(
get_vhost_is_edge
(
old_vhost
)
!=
get_vhost_is_edge
(
new_vhost
))
{
ret
=
ERROR_RTMP_EDGE_RELOAD
;
srs_error
(
"reload never supports mode changed. ret=%d"
,
ret
);
return
ret
;
}
// DISABLED => ENABLED
if
(
!
get_vhost_enabled
(
old_vhost
)
&&
get_vhost_enabled
(
new_vhost
))
{
srs_trace
(
"vhost %s added, reload it."
,
vhost
.
c_str
());
...
...
@@ -909,6 +897,19 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
continue
;
}
// mode, never supports reload.
// first, for the origin and edge role change is too complex.
// second, the vhosts in origin device group normally are all origin,
// they never change to edge sometimes.
// third, the origin or upnode device can always be restart,
// edge will retry and the users connected to edge are ok.
// it's ok to add or remove edge/origin vhost.
if
(
get_vhost_is_edge
(
old_vhost
)
!=
get_vhost_is_edge
(
new_vhost
))
{
ret
=
ERROR_RTMP_EDGE_RELOAD
;
srs_error
(
"reload never supports mode changed. ret=%d"
,
ret
);
return
ret
;
}
// ENABLED => ENABLED (modified)
if
(
get_vhost_enabled
(
new_vhost
)
&&
get_vhost_enabled
(
old_vhost
))
{
srs_trace
(
"vhost %s maybe modified, reload its detail."
,
vhost
.
c_str
());
...
...
请
注册
或
登录
后发表评论