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

refine code, donot listen if not enabled http

This commit is contained in:
winlin 2014-04-02 12:12:27 +08:00
parent ec6d696565
commit 0ba0c14fb8

View file

@ -307,7 +307,8 @@ int SrsServer::listen()
return ret;
}
}
#ifdef SRS_HTTP_API
if (_srs_config->get_http_api_enabled()) {
SrsListener* listener = new SrsListener(this, SrsListenerHttpApi);
listeners.push_back(listener);
@ -318,7 +319,9 @@ int SrsServer::listen()
return ret;
}
}
#endif
#ifdef SRS_HTTP_SERVER
if (_srs_config->get_http_stream_enabled()) {
SrsListener* listener = new SrsListener(this, SrsListenerHttpStream);
listeners.push_back(listener);
@ -329,6 +332,7 @@ int SrsServer::listen()
return ret;
}
}
#endif
return ret;
}