aboutsummaryrefslogtreecommitdiff
path: root/src/testbed
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-08-13 19:42:00 +0000
committerChristian Grothoff <christian@grothoff.org>2016-08-13 19:42:00 +0000
commit39b82864a1ac0d4fd01cdb69b2fcfb46dd79ec25 (patch)
tree65000ee60e7d25da722f967f25fd90ea5120cb53 /src/testbed
parent15222bc9e49f1260f02b4adb2fe78b279dc1e38f (diff)
downloadgnunet-39b82864a1ac0d4fd01cdb69b2fcfb46dd79ec25.tar.gz
gnunet-39b82864a1ac0d4fd01cdb69b2fcfb46dd79ec25.zip
-fix bug introduced when STAR topology was added, STAR must only be once in the topology_strings[]-array
Diffstat (limited to 'src/testbed')
-rw-r--r--src/testbed/testbed_api_testbed.c3
-rw-r--r--src/testbed/testbed_api_topology.c10
2 files changed, 6 insertions, 7 deletions
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c
index 1b6656234..eaa1656ba 100644
--- a/src/testbed/testbed_api_testbed.c
+++ b/src/testbed/testbed_api_testbed.c
@@ -1366,6 +1366,9 @@ GNUNET_TESTBED_run (const char *host_filename,
1366 goto error_cleanup; 1366 goto error_cleanup;
1367 } 1367 }
1368 goto warn_ignore; 1368 goto warn_ignore;
1369 case GNUNET_TESTBED_TOPOLOGY_OPTION_END:
1370 /* not allowed! */
1371 GNUNET_assert (0);
1369 default: 1372 default:
1370 warn_ignore: 1373 warn_ignore:
1371 /* Warn if OVERLAY_RANDOM_LINKS is present that it will be ignored */ 1374 /* Warn if OVERLAY_RANDOM_LINKS is present that it will be ignored */
diff --git a/src/testbed/testbed_api_topology.c b/src/testbed/testbed_api_topology.c
index b7722b9c7..c86dd2739 100644
--- a/src/testbed/testbed_api_topology.c
+++ b/src/testbed/testbed_api_topology.c
@@ -260,7 +260,7 @@ struct TopologyContext
260 * A array of names representing topologies. Should be in sync with enum 260 * A array of names representing topologies. Should be in sync with enum
261 * GNUNET_TESTBED_TopologyOption 261 * GNUNET_TESTBED_TopologyOption
262 */ 262 */
263const char *topology_strings[] = { 263static const char *topology_strings[] = {
264 264
265 /** 265 /**
266 * A clique (everyone connected to everyone else). No options. If there are N 266 * A clique (everyone connected to everyone else). No options. If there are N
@@ -268,7 +268,7 @@ const char *topology_strings[] = {
268 */ 268 */
269 "CLIQUE", 269 "CLIQUE",
270 270
271 /** 271 /*
272 * Small-world network (2d torus plus random links). Followed 272 * Small-world network (2d torus plus random links). Followed
273 * by the number of random links to add (unsigned int). 273 * by the number of random links to add (unsigned int).
274 */ 274 */
@@ -321,11 +321,6 @@ const char *topology_strings[] = {
321 "LINE", 321 "LINE",
322 322
323 /** 323 /**
324 * Star topology. No options.
325 */
326 "STAR",
327
328 /**
329 * Read a topology from a given file. Followed by the name of the file (const char *). 324 * Read a topology from a given file. Followed by the name of the file (const char *).
330 */ 325 */
331 "FROM_FILE", 326 "FROM_FILE",
@@ -1476,6 +1471,7 @@ GNUNET_TESTBED_topology_get_ (enum GNUNET_TESTBED_TopologyOption *topology,
1476 { 1471 {
1477 if (NULL != topology) 1472 if (NULL != topology)
1478 *topology = (enum GNUNET_TESTBED_TopologyOption) cnt; 1473 *topology = (enum GNUNET_TESTBED_TopologyOption) cnt;
1474 GNUNET_assert (GNUNET_TESTBED_TOPOLOGY_OPTION_END != *topology);
1479 return GNUNET_YES; 1475 return GNUNET_YES;
1480 } 1476 }
1481 } 1477 }