mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #319, support raw update global.listen
This commit is contained in:
parent
f8d8c3ace4
commit
364460f2ab
5 changed files with 37 additions and 14 deletions
|
@ -1006,11 +1006,20 @@ int SrsGoApiRaw::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
|||
}
|
||||
if (invalid) {
|
||||
ret = ERROR_SYSTEM_CONFIG_RAW_PARAMS;
|
||||
srs_error("raw api update global.listen invalid eps=%s. ret=%d", value.c_str(), ret);
|
||||
srs_error("raw api update global.listen=%s failed. ret=%d", value.c_str(), ret);
|
||||
return srs_api_response_code(w, r, ret);
|
||||
}
|
||||
|
||||
if ((ret = _srs_config->raw_set_listen(eps)) != ERROR_SUCCESS) {
|
||||
srs_error("raw api update global.listen=%s failed. ret=%d", value.c_str(), ret);
|
||||
return srs_api_response_code(w, r, ret);
|
||||
}
|
||||
}
|
||||
|
||||
server->on_signal(SRS_SIGNAL_RELOAD);
|
||||
server->on_signal(SRS_SIGNAL_PERSISTENCE_CONFIG);
|
||||
srs_trace("raw api update %s=%s ok.", scope.c_str(), value.c_str());
|
||||
|
||||
return srs_api_response(w, r, obj->to_json());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue