gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37709 - gnunet/src/testbed


From: gnunet
Subject: [GNUnet-SVN] r37709 - gnunet/src/testbed
Date: Sat, 13 Aug 2016 21:42:00 +0200

Author: grothoff
Date: 2016-08-13 21:42:00 +0200 (Sat, 13 Aug 2016)
New Revision: 37709

Modified:
   gnunet/src/testbed/testbed_api_testbed.c
   gnunet/src/testbed/testbed_api_topology.c
Log:
-fix bug introduced when STAR topology was added, STAR must only be once in the 
topology_strings[]-array

Modified: gnunet/src/testbed/testbed_api_testbed.c
===================================================================
--- gnunet/src/testbed/testbed_api_testbed.c    2016-08-13 18:53:13 UTC (rev 
37708)
+++ gnunet/src/testbed/testbed_api_testbed.c    2016-08-13 19:42:00 UTC (rev 
37709)
@@ -1366,6 +1366,9 @@
       goto error_cleanup;
     }
     goto warn_ignore;
+  case GNUNET_TESTBED_TOPOLOGY_OPTION_END:
+    /* not allowed! */
+    GNUNET_assert (0);
   default:
   warn_ignore:
     /* Warn if OVERLAY_RANDOM_LINKS is present that it will be ignored */

Modified: gnunet/src/testbed/testbed_api_topology.c
===================================================================
--- gnunet/src/testbed/testbed_api_topology.c   2016-08-13 18:53:13 UTC (rev 
37708)
+++ gnunet/src/testbed/testbed_api_topology.c   2016-08-13 19:42:00 UTC (rev 
37709)
@@ -260,7 +260,7 @@
  * A array of names representing topologies. Should be in sync with enum
  * GNUNET_TESTBED_TopologyOption
  */
-const char *topology_strings[] = {
+static const char *topology_strings[] = {
 
     /**
      * A clique (everyone connected to everyone else).  No options. If there 
are N
@@ -268,7 +268,7 @@
      */
   "CLIQUE",
 
-    /**
+    /*
      * Small-world network (2d torus plus random links).  Followed
      * by the number of random links to add (unsigned int).
      */
@@ -321,11 +321,6 @@
   "LINE",
 
     /**
-     * Star topology.  No options.
-     */
-  "STAR",
-
-    /**
      * Read a topology from a given file.  Followed by the name of the file 
(const char *).
      */
   "FROM_FILE",
@@ -1476,6 +1471,7 @@
     {
       if (NULL != topology)
         *topology = (enum GNUNET_TESTBED_TopologyOption) cnt;
+      GNUNET_assert (GNUNET_TESTBED_TOPOLOGY_OPTION_END != *topology);
       return GNUNET_YES;
     }
   }




reply via email to

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