mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #913, refine server utility
This commit is contained in:
parent
ca9f0bdb1e
commit
a20e2c3ef6
15 changed files with 222 additions and 244 deletions
|
@ -721,6 +721,7 @@ srs_error_t SrsHttpStreamServer::initialize()
|
|||
int SrsHttpStreamServer::http_mount(SrsSource* s, SrsRequest* r)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
// the id to identify stream.
|
||||
std::string sid = r->get_stream_url();
|
||||
|
@ -767,7 +768,11 @@ int SrsHttpStreamServer::http_mount(SrsSource* s, SrsRequest* r)
|
|||
// we must register the handler, then start the thread,
|
||||
// for the thread will cause thread switch context.
|
||||
// @see https://github.com/ossrs/srs/issues/404
|
||||
if ((ret = mux.handle(mount, entry->stream)) != ERROR_SUCCESS) {
|
||||
if ((err = mux.handle(mount, entry->stream)) != srs_success) {
|
||||
// TODO: FIXME: Use error.
|
||||
ret = srs_error_code(err);
|
||||
srs_freep(err);
|
||||
|
||||
srs_error("http: mount flv stream for vhost=%s failed. ret=%d", sid.c_str(), ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue