TD-1323 allow first and second not to configure port

This commit is contained in:
Shengliang Guan 2020-09-04 08:36:29 +00:00
parent d2958a80a1
commit 4ae4d16043
1 changed files with 10 additions and 1 deletions

View File

@ -1284,6 +1284,9 @@ void taosInitGlobalCfg() {
}
bool taosCheckGlobalCfg() {
char fqdn[TSDB_EP_LEN];
uint16_t port;
if (debugFlag & DEBUG_TRACE || debugFlag & DEBUG_DEBUG || debugFlag & DEBUG_DUMP) {
taosSetAllDebugFlag();
}
@ -1297,12 +1300,18 @@ bool taosCheckGlobalCfg() {
if (tsFirst[0] == 0) {
strcpy(tsFirst, tsLocalEp);
} else {
taosGetFqdnPortFromEp(tsFirst, fqdn, &port);
snprintf(tsFirst, sizeof(tsFirst), "%s:%d", fqdn, port);
}
if (tsSecond[0] == 0) {
strcpy(tsSecond, tsLocalEp);
} else {
taosGetFqdnPortFromEp(tsSecond, fqdn, &port);
snprintf(tsSecond, sizeof(tsSecond), "%s:%d", fqdn, port);
}
taosGetSystemInfo();
tsSetLocale();