fix for over-reporting number of necessary connections
authorNathan S. Evans <evans@in.tum.de>
Wed, 16 Mar 2011 12:18:52 +0000 (12:18 +0000)
committerNathan S. Evans <evans@in.tum.de>
Wed, 16 Mar 2011 12:18:52 +0000 (12:18 +0000)
src/testing/testing_group.c

index 0f9b9534a1c8ea19ae46b7c51302dbf3ebffdd4f..1a7b7cc6e5510dc2463c7eb00cf61edcfd1b3c30 100644 (file)
@@ -3696,7 +3696,7 @@ copy_allowed_topology(struct GNUNET_TESTING_PeerGroup *pg)
                       "Creating connection between %d and %d\n", pg_iter,
                       iter->index);
           total += add_connections (pg, pg_iter, iter->index, CONNECT,
-                                    GNUNET_NO);
+                                    GNUNET_YES);
           //total += add_actual_connections(pg, pg_iter, iter->index);
           iter = iter->next;
         }
@@ -3960,6 +3960,8 @@ GNUNET_TESTING_create_topology(struct GNUNET_TESTING_PeerGroup *pg,
   if ((restrict_topology != GNUNET_TESTING_TOPOLOGY_NONE) && (restrict_topology
       != GNUNET_TESTING_TOPOLOGY_FROM_FILE))
     create_clique (pg, &add_connections, BLACKLIST, GNUNET_NO);
+  else
+    return num_connections;
 
   unblacklisted_connections = 0;
   /* Un-blacklist connections as per the topology specified */