]> source.dussan.org Git - tigervnc.git/commitdiff
Make sure Win32 sockets are available in new listening API
authorPierre Ossman <ossman@cendio.se>
Tue, 17 Mar 2015 16:10:10 +0000 (17:10 +0100)
committerPierre Ossman <ossman@cendio.se>
Tue, 17 Mar 2015 16:18:50 +0000 (17:18 +0100)
common/network/TcpSocket.cxx

index 5ce7bc315ac73a26a20b096225d16f32025f1bda..26ea1f5ea22fe9bf193addfea3d7ab6cd160b25d 100644 (file)
@@ -543,6 +543,9 @@ void network::createLocalTcpListeners(std::list<TcpListener> *listeners,
 {
   std::list<TcpListener> new_listeners;
   vnc_sockaddr_t sa;
+
+  initSockets();
+
 #ifdef HAVE_GETADDRINFO
   if (UseIPv6) {
     sa.u.sin6.sin6_family = AF_INET6;
@@ -591,6 +594,8 @@ void network::createTcpListeners(std::list<TcpListener> *listeners,
   struct addrinfo *ai, *current, hints;
   char service[16];
 
+  initSockets();
+
   memset(&hints, 0, sizeof(struct addrinfo));
   hints.ai_flags = AI_PASSIVE | AI_NUMERICSERV;
   hints.ai_family = AF_UNSPEC;