mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add config item for the stat disk device name
This commit is contained in:
parent
7c1dd97513
commit
b334021836
5 changed files with 73 additions and 11 deletions
|
@ -1249,7 +1249,7 @@ int SrsConfig::check_config()
|
|||
SrsConfDirective* conf = get_stats();
|
||||
for (int i = 0; conf && i < (int)conf->directives.size(); i++) {
|
||||
string n = conf->at(i)->name;
|
||||
if (n != "network_device_index") {
|
||||
if (n != "network_device_index" && n != "disk_device_name") {
|
||||
ret = ERROR_SYSTEM_CONFIG_INVALID;
|
||||
srs_error("unsupported stats directive %s, ret=%d", n.c_str(), ret);
|
||||
return ret;
|
||||
|
@ -3194,6 +3194,22 @@ int SrsConfig::get_stats_network_device_index()
|
|||
return ::atoi(conf->arg0().c_str());
|
||||
}
|
||||
|
||||
SrsConfDirective* SrsConfig::get_stats_disk_device()
|
||||
{
|
||||
SrsConfDirective* conf = get_stats();
|
||||
|
||||
if (!conf) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
conf = conf->get("disk_device_name");
|
||||
if (!conf || conf->args.size() == 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
||||
namespace _srs_internal
|
||||
{
|
||||
SrsConfigBuffer::SrsConfigBuffer()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue