fix
authorChristian Grothoff <christian@grothoff.org>
Wed, 6 Oct 2010 09:46:54 +0000 (09:46 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 6 Oct 2010 09:46:54 +0000 (09:46 +0000)
src/util/network.c

index 38d9ccb72e75d3bbd929abdcb5e7b7ebaf41fc81..2f3ac43b290d6699e16a01c99713ea9bb787144b 100644 (file)
@@ -207,10 +207,8 @@ GNUNET_NETWORK_socket_accept (const struct GNUNET_NETWORK_Handle *desc,
   struct GNUNET_NETWORK_Handle *ret;
 
   ret = GNUNET_malloc (sizeof (struct GNUNET_NETWORK_Handle));
-  ret->af = address->sa_family;
-  /* NOTE: if sa_family does not exist on some platform,
-     using AF_UNSPEC should be safe */
   ret->fd = accept (desc->fd, address, address_len);
+  ret->af = address->sa_family;
   if (ret->fd == INVALID_SOCKET)
     {
 #ifdef MINGW