1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 11:51:57 +00:00

Fix bug for CPU arch info

This commit is contained in:
winlin 2021-11-15 20:33:27 +08:00
parent 365bf08280
commit f3380d2ec0
2 changed files with 7 additions and 2 deletions

View file

@ -113,6 +113,7 @@ tcmalloc_release_rate 0.8;
# Query the latest available version of SRS, write a log to notice user to upgrade. # Query the latest available version of SRS, write a log to notice user to upgrade.
# @see https://github.com/ossrs/srs/issues/2424 # @see https://github.com/ossrs/srs/issues/2424
# @see https://github.com/ossrs/srs/issues/2508
# Default: on # Default: on
query_latest_version on; query_latest_version on;

View file

@ -47,6 +47,8 @@ extern bool _srs_in_docker;
#define SRS_CHECK_FEATURE2(cond, key, ss) if (cond) ss << "&" << key << "=1" #define SRS_CHECK_FEATURE2(cond, key, ss) if (cond) ss << "&" << key << "=1"
#define SRS_CHECK_FEATURE3(cond, key, value, ss) if (cond) ss << "&" << key << "=" << value #define SRS_CHECK_FEATURE3(cond, key, value, ss) if (cond) ss << "&" << key << "=" << value
// @see https://github.com/ossrs/srs/issues/2424
// @see https://github.com/ossrs/srs/issues/2508
void srs_build_features(stringstream& ss) void srs_build_features(stringstream& ss)
{ {
if (SRS_OSX_BOOL) { if (SRS_OSX_BOOL) {
@ -55,9 +57,9 @@ void srs_build_features(stringstream& ss)
ss << "&os=linux"; ss << "&os=linux";
} }
#if defined(__amd64__) && defined(__x86_64__) && defined(__i386__) #if defined(__amd64__) || defined(__x86_64__) || defined(__i386__)
ss << "&x86=1"; ss << "&x86=1";
#elif defined(__arm__) && defined(__aarch64__) #elif defined(__arm__) || defined(__aarch64__)
ss << "&arm=1"; ss << "&arm=1";
#elif defined(__mips__) #elif defined(__mips__)
ss << "&mips=1"; ss << "&mips=1";
@ -176,6 +178,8 @@ SrsLatestVersion::~SrsLatestVersion()
srs_error_t SrsLatestVersion::start() srs_error_t SrsLatestVersion::start()
{ {
// @see https://github.com/ossrs/srs/issues/2424
// @see https://github.com/ossrs/srs/issues/2508
if (!_srs_config->whether_query_latest_version()) { if (!_srs_config->whether_query_latest_version()) {
return srs_success; return srs_success;
} }