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-07-17 11:34:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1e8981eb08343cbfa6677877df1820c6ff1cd9d1
1e8981eb
1 parent
784d7499
extracta parse_buffer for config
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
16 行增加
和
2 行删除
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_config.hpp
trunk/src/app/srs_app_config.cpp
查看文件 @
1e8981e
...
...
@@ -1161,7 +1161,14 @@ int SrsConfig::parse_file(const char* filename)
return
ret
;
}
if
((
ret
=
root
->
parse
(
&
buffer
))
!=
ERROR_SUCCESS
)
{
return
parse_buffer
(
&
buffer
);
}
int
SrsConfig
::
parse_buffer
(
_srs_internal
::
SrsConfigBuffer
*
buffer
)
{
int
ret
=
ERROR_SUCCESS
;
if
((
ret
=
root
->
parse
(
buffer
))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
...
...
trunk/src/app/srs_app_config.hpp
查看文件 @
1e8981e
...
...
@@ -210,7 +210,7 @@ private:
};
/**
* the config
pars
er.
* the config
service provid
er.
* for the config supports reload, so never keep the reference cross st-thread,
* that is, never save the SrsConfDirective* get by any api of config,
* for it maybe free in the reload st-thread cycle.
...
...
@@ -248,6 +248,13 @@ private:
virtual
int
parse_argv
(
int
&
i
,
char
**
argv
);
virtual
void
print_help
(
char
**
argv
);
virtual
int
parse_file
(
const
char
*
filename
);
protected
:
/**
* parse config from the buffer.
* @param buffer, the config buffer, user must delete it.
* @remark, protected for the utest to override with mock.
*/
virtual
int
parse_buffer
(
_srs_internal
::
SrsConfigBuffer
*
buffer
);
public
:
virtual
std
::
string
cwd
();
virtual
std
::
string
argv
();
...
...
请
注册
或
登录
后发表评论