aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-mesh-profiler.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-03-21 18:44:46 +0000
committerBart Polot <bart@net.in.tum.de>2014-03-21 18:44:46 +0000
commit51de20f3d259aec376595e625eac5c78c628e2fc (patch)
tree21444a114ed75ed3f45d6f34e670647a976f6f83 /src/mesh/gnunet-mesh-profiler.c
parent6fab84f7191c94148e34d6f6b64e944c64073e72 (diff)
downloadgnunet-51de20f3d259aec376595e625eac5c78c628e2fc.tar.gz
gnunet-51de20f3d259aec376595e625eac5c78c628e2fc.zip
- check early
Diffstat (limited to 'src/mesh/gnunet-mesh-profiler.c')
-rw-r--r--src/mesh/gnunet-mesh-profiler.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesh/gnunet-mesh-profiler.c b/src/mesh/gnunet-mesh-profiler.c
index 0a92c857c..d93fa6081 100644
--- a/src/mesh/gnunet-mesh-profiler.c
+++ b/src/mesh/gnunet-mesh-profiler.c
@@ -913,13 +913,6 @@ tmain (void *cls,
913 913
914 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test main\n"); 914 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test main\n");
915 test_ctx = ctx; 915 test_ctx = ctx;
916 if (peers_total < 2 * peers_pinging)
917 {
918 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
919 "not enough peers, total should be > 2 * peers_pinging\n");
920 GNUNET_MESH_TEST_cleanup (ctx);
921 return;
922 }
923 GNUNET_assert (peers_total == num_peers); 916 GNUNET_assert (peers_total == num_peers);
924 peers_running = num_peers; 917 peers_running = num_peers;
925 testbed_handles = testbed_peers; 918 testbed_handles = testbed_peers;
@@ -969,6 +962,13 @@ main (int argc, char *argv[])
969 962
970 peers_pinging = atoll (argv[2]); 963 peers_pinging = atoll (argv[2]);
971 964
965 if (peers_total < 2 * peers_pinging)
966 {
967 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
968 "not enough peers, total should be > 2 * peers_pinging\n");
969 return 1;
970 }
971
972 ids = GNUNET_CONTAINER_multipeermap_create (2 * peers_total, GNUNET_YES); 972 ids = GNUNET_CONTAINER_multipeermap_create (2 * peers_total, GNUNET_YES);
973 GNUNET_assert (NULL != ids); 973 GNUNET_assert (NULL != ids);
974 p_ids = 0; 974 p_ids = 0;