已开启
isBeta fix #1176
wenxingqi创建于 6 天前
isBeta fix #1176
已开启
共 1 个文件变更+10-10
| @@ -100,18 +100,18 @@ private: | |||
| 100 | bool IsBeta() | 100 | bool IsBeta() |
| 101 | { | 101 | { |
| 102 | LibbegetutilAdapter* adapter = LibbegetutilAdapter::Instance(); | 102 | LibbegetutilAdapter* adapter = LibbegetutilAdapter::Instance(); |
| 103 | - constexpr int versionTypeLen = 32; | 103 | + constexpr int retValueLen = 32; |
| 104 | - char retValue[versionTypeLen] = {0}; | 104 | + char retValueVersion[retValueLen] = {0}; |
| 105 | + char retValueStage[retValueLen] = {0}; | ||
| 105 | if (adapter->GetParameter != nullptr) { | 106 | if (adapter->GetParameter != nullptr) { |
| 106 | - int ret = adapter->GetParameter("const.logsystem.versiontype", "false", retValue, versionTypeLen); | 107 | + int retVersion = adapter->GetParameter("const.logsystem.versiontype", "false", retValueVersion, retValueLen); |
| 107 | - if (ret > 0) { | 108 | + int retStage = adapter->GetParameter("const.product.dfx.fans.stage", "false", retValueStage, retValueLen); |
| 108 | - int result = strcmp(retValue, "beta"); | 109 | + bool resultVersion = retVersion > 0 ? strcmp(retValueVersion, "commercial") != 0 : true; |
| 109 | - if (result == 0) { | 110 | + bool resultStage = retStage > 0 ? strcmp(retValueStage, "1") == 0 : false; |
| 110 | - return true; | 111 | + // (const.logsystem.versiontype为commercial)&&(const.product.dfx.fans.stage不为1)才返回false |
| 111 | - } | 112 | + return resultVersion || resultStage; |
| 112 | - } | ||
| 113 | } | 113 | } |
| 114 | - return false; | 114 | + return true; |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | void TaskBlockInfoReport(const long long passed, const std::string& task_label, int qos, uint64_t freq) | 117 | void TaskBlockInfoReport(const long long passed, const std::string& task_label, int qos, uint64_t freq) |