summaryrefslogtreecommitdiffstats
path: root/libvncserver/sockets.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncserver/sockets.c')
-rw-r--r--libvncserver/sockets.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
index 6c225e9..31dddd6 100644
--- a/libvncserver/sockets.c
+++ b/libvncserver/sockets.c
@@ -455,11 +455,13 @@ rfbProcessNewConnection(rfbScreenInfoPtr rfbScreen)
#endif
#ifdef LIBVNCSERVER_IPv6
- char host[1024];
- if(getnameinfo((struct sockaddr*)&addr, addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST) != 0) {
- rfbLogPerror("rfbProcessNewConnection: error in getnameinfo");
+ {
+ char host[1024];
+ if(getnameinfo((struct sockaddr*)&addr, addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST) != 0) {
+ rfbLogPerror("rfbProcessNewConnection: error in getnameinfo");
+ }
+ rfbLog("Got connection from client %s\n", host);
}
- rfbLog("Got connection from client %s\n", host);
#else
rfbLog("Got connection from client %s\n", inet_ntoa(addr.sin_addr));
#endif