1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-12 11:21:52 +00:00

Use global _srs_server for debugging. 3.0.151

This commit is contained in:
winlin 2020-10-31 17:47:27 +08:00
parent bf5e2add83
commit 9f9e3a5d42
2 changed files with 7 additions and 6 deletions

View file

@ -24,6 +24,6 @@
#ifndef SRS_CORE_VERSION3_HPP
#define SRS_CORE_VERSION3_HPP
#define SRS_VERSION3_REVISION 149
#define SRS_VERSION3_REVISION 151
#endif

View file

@ -65,6 +65,9 @@ SrsConfig* _srs_config = new SrsConfig();
// @global version of srs, which can grep keyword "XCORE"
extern const char* _srs_version;
// @global main SRS server, for debugging
SrsServer* _srs_server = NULL;
/**
* main entrance.
*/
@ -177,11 +180,9 @@ srs_error_t do_main(int argc, char** argv)
// features
show_macro_features();
SrsServer* svr = new SrsServer();
SrsAutoFree(SrsServer, svr);
if ((err = run(svr)) != srs_success) {
_srs_server = new SrsServer();
if ((err = run(_srs_server)) != srs_success) {
return srs_error_wrap(err, "run");
}