From b8b96689bf29ae1b2fca12a59be9196d6a2acb25 Mon Sep 17 00:00:00 2001 From: runge Date: Sat, 5 Mar 2005 01:06:05 +0000 Subject: add '-listen ipaddr' option --- libvncclient/sockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libvncclient/sockets.c') diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c index efe7eb9..21047fb 100644 --- a/libvncclient/sockets.c +++ b/libvncclient/sockets.c @@ -305,7 +305,7 @@ FindFreeTcpPort(void) struct sockaddr_in addr; addr.sin_family = AF_INET; - addr.sin_addr.s_addr = INADDR_ANY; + addr.sin_addr.s_addr = htonl(INADDR_ANY); sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { @@ -339,7 +339,7 @@ ListenAtTcpPort(int port) addr.sin_family = AF_INET; addr.sin_port = htons(port); - addr.sin_addr.s_addr = INADDR_ANY; + addr.sin_addr.s_addr = htonl(INADDR_ANY); sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { -- cgit v1.2.1