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

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

上级 0c439591
......@@ -16,7 +16,7 @@
#include "os.h"
#include "tulog.h"
#include "tsocket.h"
#include "tutil.h"
#include "taoserror.h"
int taosGetFqdn(char *fqdn) {
char hostname[1024];
......@@ -55,8 +55,14 @@ uint32_t taosGetIpFromFqdn(const char *fqdn) {
uint32_t ip = ia.s_addr;
freeaddrinfo(result);
return ip;
} else {
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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册