1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #126, srs_publiser add warnings. refine config utest.

This commit is contained in:
winlin 2014-07-26 14:43:37 +08:00
parent b17c736f3f
commit 7241fa8744
8 changed files with 84 additions and 8 deletions

View file

@ -80,17 +80,21 @@ SrsFastLog::~SrsFastLog()
fd = -1;
}
_srs_config->unsubscribe(this);
if (_srs_config) {
_srs_config->unsubscribe(this);
}
}
int SrsFastLog::initialize()
{
int ret = ERROR_SUCCESS;
_srs_config->subscribe(this);
log_to_file_tank = _srs_config->get_log_tank_file();
_level = srs_get_log_level(_srs_config->get_log_level());
if (_srs_config) {
_srs_config->subscribe(this);
log_to_file_tank = _srs_config->get_log_tank_file();
_level = srs_get_log_level(_srs_config->get_log_level());
}
return ret;
}