提交 4bed0a0f 编写于 作者: H Haojun Liao

[td-1391] update the error msg output info.

上级 0c439591
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "os.h" #include "os.h"
#include "tulog.h" #include "tulog.h"
#include "tsocket.h" #include "tsocket.h"
#include "tutil.h" #include "taoserror.h"
int taosGetFqdn(char *fqdn) { int taosGetFqdn(char *fqdn) {
char hostname[1024]; char hostname[1024];
...@@ -56,7 +56,13 @@ uint32_t taosGetIpFromFqdn(const char *fqdn) { ...@@ -56,7 +56,13 @@ uint32_t taosGetIpFromFqdn(const char *fqdn) {
freeaddrinfo(result); freeaddrinfo(result);
return ip; return ip;
} else { } else {
uError("failed get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, gai_strerror(ret)); if (ret == EAI_SYSTEM) {
uError("failed to get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, strerror(errno));
terrno = TAOS_SYSTEM_ERROR(errno);
} else {
uError("failed get the ip address, fqdn:%s, code:%d, reason:%s", fqdn, ret, gai_strerror(ret));
}
return 0xFFFFFFFF; return 0xFFFFFFFF;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册