fixing bad control flow
authorChristian Grothoff <christian@grothoff.org>
Tue, 1 Jun 2010 21:06:45 +0000 (21:06 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 1 Jun 2010 21:06:45 +0000 (21:06 +0000)
src/transport/test_plugin_transport_http.c

index b28750443941d15c65c6db0945316607d0b7e7d0..9d9ae2f09173c5cabac8b78d2dbcc12952458bdc 100644 (file)
@@ -619,11 +619,16 @@ notify_address (void *cls,
       inet_ntop(AF_INET, (struct in_addr *) addr,address,INET_ADDRSTRLEN);
       port = ntohs(((struct IPv4HttpAddress *) addr)->u_port);
     }
-  if (addrlen == (sizeof (struct IPv6HttpAddress)))
+  else if (addrlen == (sizeof (struct IPv6HttpAddress)))
     {
       inet_ntop(AF_INET6, (struct in6_addr *) addr,address,INET6_ADDRSTRLEN);
       port = ntohs(((struct IPv6HttpAddress *) addr)->u6_port);
     }
+  else
+    {
+      GNUNET_break (0);
+      return;
+    }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
              _("Transport plugin notification for address: `%s':%u\n"),
              address,