提交 4ae4d160 编写于 作者: S Shengliang Guan

TD-1323 allow first and second not to configure port

上级 d2958a80
...@@ -1284,6 +1284,9 @@ void taosInitGlobalCfg() { ...@@ -1284,6 +1284,9 @@ void taosInitGlobalCfg() {
} }
bool taosCheckGlobalCfg() { bool taosCheckGlobalCfg() {
char fqdn[TSDB_EP_LEN];
uint16_t port;
if (debugFlag & DEBUG_TRACE || debugFlag & DEBUG_DEBUG || debugFlag & DEBUG_DUMP) { if (debugFlag & DEBUG_TRACE || debugFlag & DEBUG_DEBUG || debugFlag & DEBUG_DUMP) {
taosSetAllDebugFlag(); taosSetAllDebugFlag();
} }
...@@ -1297,12 +1300,18 @@ bool taosCheckGlobalCfg() { ...@@ -1297,12 +1300,18 @@ bool taosCheckGlobalCfg() {
if (tsFirst[0] == 0) { if (tsFirst[0] == 0) {
strcpy(tsFirst, tsLocalEp); strcpy(tsFirst, tsLocalEp);
} else {
taosGetFqdnPortFromEp(tsFirst, fqdn, &port);
snprintf(tsFirst, sizeof(tsFirst), "%s:%d", fqdn, port);
} }
if (tsSecond[0] == 0) { if (tsSecond[0] == 0) {
strcpy(tsSecond, tsLocalEp); strcpy(tsSecond, tsLocalEp);
} else {
taosGetFqdnPortFromEp(tsSecond, fqdn, &port);
snprintf(tsSecond, sizeof(tsSecond), "%s:%d", fqdn, port);
} }
taosGetSystemInfo(); taosGetSystemInfo();
tsSetLocale(); tsSetLocale();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册