[gnio] Use the WSAStartup in GInetAddress



commit 35fbae4c9ded4e36c3deb72a63a54430ee9248ab
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Apr 28 10:13:08 2009 +0200

    Use the WSAStartup in GInetAddress
    
    We want to only call WSAStartup in one place, and this place is
    currently in the GInetAddress type initialization, so ensure this is
    run instead of calling WSAStartup ourself.
---
 gio/gsocket.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/gio/gsocket.c b/gio/gsocket.c
index 55c8191..32b50fb 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -395,11 +395,8 @@ g_socket_class_init (GSocketClass *klass)
 {
   GObjectClass *gobject_class G_GNUC_UNUSED = G_OBJECT_CLASS (klass);
 
-#ifdef G_OS_WIN32
-  WSADATA data;
-
-  WSAStartup(MAKEWORD(2, 2), &data);
-#endif
+  /* Make sure winsock has been initialized */
+  (void) g_inet_address_get_type ();
 
   g_type_class_add_private (klass, sizeof (GSocketPrivate));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]