(no commit message)
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 16 Nov 2011 09:09:23 +0000 (09:09 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 16 Nov 2011 09:09:23 +0000 (09:09 +0000)
src/transport/plugin_transport_http.c

index 69d964c431d166cf592ff220687c06d9ed7cad50..a6c9190bde8bf2cf092fd8948c71d6526580bee6 100644 (file)
@@ -563,17 +563,16 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
                      GNUNET_i2s (target));
 #endif
     int res = GNUNET_OK;
-
     if (addrlen == sizeof (struct IPv4HttpAddress))
     {
       struct IPv4HttpAddress * a4 = (struct IPv4HttpAddress *) addr;
-      if (ntohs(a4->u4_port) == 0)
+      if ((ntohs(a4->u4_port) == 0) || (plugin->ipv4 == GNUNET_NO))
           res = GNUNET_SYSERR;
     }
     if (addrlen == sizeof (struct IPv6HttpAddress))
     {
       struct IPv6HttpAddress * a6 = (struct IPv6HttpAddress *) addr;
-      if (ntohs(a6->u6_port) == 0)
+      if ((ntohs(a6->u6_port) == 0) || (plugin->ipv6 == GNUNET_NO))
           res = GNUNET_SYSERR;
     }
     if (res == GNUNET_OK)