[td-1391] update the error msg output info.
This commit is contained in:
parent
0c43959191
commit
4bed0a0f39
|
@ -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) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue