gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r13815 - gnunet/src/nat


From: gnunet
Subject: [GNUnet-SVN] r13815 - gnunet/src/nat
Date: Sat, 27 Nov 2010 16:47:58 +0100

Author: durner
Date: 2010-11-27 16:47:58 +0100 (Sat, 27 Nov 2010)
New Revision: 13815

Modified:
   gnunet/src/nat/nat.c
   gnunet/src/nat/upnp-commands.c
   gnunet/src/nat/upnp-discover.c
   gnunet/src/nat/upnp.c
Log:
MinGW

Modified: gnunet/src/nat/nat.c
===================================================================
--- gnunet/src/nat/nat.c        2010-11-26 15:07:34 UTC (rev 13814)
+++ gnunet/src/nat/nat.c        2010-11-27 15:47:58 UTC (rev 13815)
@@ -131,7 +131,7 @@
 static int
 get_traversal_status (const struct GNUNET_NAT_Handle *h)
 {
-  return MAX (h->natpmp_status, h->upnp_status);
+  return GNUNET_MAX (h->natpmp_status, h->upnp_status);
 }
 
 

Modified: gnunet/src/nat/upnp-commands.c
===================================================================
--- gnunet/src/nat/upnp-commands.c      2010-11-26 15:07:34 UTC (rev 13814)
+++ gnunet/src/nat/upnp-commands.c      2010-11-27 15:47:58 UTC (rev 13815)
@@ -320,12 +320,12 @@
 
   if (!p2 || (p2 > p3))
     {
-      strncpy (hostname, p1, MIN (MAX_HOSTNAME_LEN, (int) (p3 - p1)));
+      strncpy (hostname, p1, GNUNET_MIN (MAX_HOSTNAME_LEN, (int) (p3 - p1)));
       *port = 80;
     }
   else
     {
-      strncpy (hostname, p1, MIN (MAX_HOSTNAME_LEN, (int) (p2 - p1)));
+      strncpy (hostname, p1, GNUNET_MIN (MAX_HOSTNAME_LEN, (int) (p2 - p1)));
       *port = 0;
       p2++;
 

Modified: gnunet/src/nat/upnp-discover.c
===================================================================
--- gnunet/src/nat/upnp-discover.c      2010-11-26 15:07:34 UTC (rev 13814)
+++ gnunet/src/nat/upnp-discover.c      2010-11-27 15:47:58 UTC (rev 13815)
@@ -1201,7 +1201,12 @@
         {
           if (multicastif)
             {
+#ifndef MINGW
               if_index = if_nametoindex (multicastif);
+#else
+              // FIXME
+              if_index = 0;
+#endif
               if (!if_index)
                 PRINT_SOCKET_ERROR ("if_nametoindex");
 

Modified: gnunet/src/nat/upnp.c
===================================================================
--- gnunet/src/nat/upnp.c       2010-11-26 15:07:34 UTC (rev 13814)
+++ gnunet/src/nat/upnp.c       2010-11-27 15:47:58 UTC (rev 13815)
@@ -302,7 +302,12 @@
         }
 
       /* Try IPv4 and IPv6 as we don't know what's the format */
+#ifndef MINGW
       if (inet_aton (ext_addr, &addr) != 0)
+#else
+      addr.S_un.S_addr = inet_addr(ext_addr);
+      if (addr.S_un.S_addr == INADDR_NONE)
+#endif
         {
           handle->ext_addr = GNUNET_malloc (sizeof (struct sockaddr_in));
           handle->ext_addr->sa_family = AF_INET;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]