diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-10-27 15:26:20 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-10-27 15:26:20 +0100 |
commit | 3a3ff949670c61a4a8856e1391222e156eb1cd17 (patch) | |
tree | fd8023fefa4829ceea428ec424608ef9aace1d9a /win/inspircd_win32wrapper.cpp | |
parent | cba05046ce20eed4c429093296eb481bf95d7e07 (diff) | |
parent | c99a43968f6a04c7d5d3038b4e39d14c22aa6e89 (diff) |
Merge insp20
Diffstat (limited to 'win/inspircd_win32wrapper.cpp')
-rw-r--r-- | win/inspircd_win32wrapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp index 3a3b5917a..3e0a264a5 100644 --- a/win/inspircd_win32wrapper.cpp +++ b/win/inspircd_win32wrapper.cpp @@ -39,8 +39,8 @@ CoreExport const char *insp_inet_ntop(int af, const void *src, char *dst, sockle memset(&in, 0, sizeof(in)); in.sin_family = AF_INET; memcpy(&in.sin_addr, src, sizeof(struct in_addr)); - getnameinfo((struct sockaddr *)&in, sizeof(struct sockaddr_in), dst, cnt, NULL, 0, NI_NUMERICHOST); - return dst; + if (getnameinfo((struct sockaddr *)&in, sizeof(struct sockaddr_in), dst, cnt, NULL, 0, NI_NUMERICHOST) == 0) + return dst; } else if (af == AF_INET6) { @@ -48,8 +48,8 @@ CoreExport const char *insp_inet_ntop(int af, const void *src, char *dst, sockle memset(&in, 0, sizeof(in)); in.sin6_family = AF_INET6; memcpy(&in.sin6_addr, src, sizeof(struct in_addr6)); - getnameinfo((struct sockaddr *)&in, sizeof(struct sockaddr_in6), dst, cnt, NULL, 0, NI_NUMERICHOST); - return dst; + if (getnameinfo((struct sockaddr *)&in, sizeof(struct sockaddr_in6), dst, cnt, NULL, 0, NI_NUMERICHOST) == 0) + return dst; } return NULL; } |