projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[oweals/gnunet.git]
/
src
/
rps
/
test_rps.c
diff --git
a/src/rps/test_rps.c
b/src/rps/test_rps.c
index 3ef1e6611732b682e6118b676a691b0c43ef53c2..92d8c12ea5a1ae46ccbe826d75542e01def01932 100644
(file)
--- a/
src/rps/test_rps.c
+++ b/
src/rps/test_rps.c
@@
-841,6
+841,13
@@
seed_peers (void *cls)
unsigned int amount;
unsigned int i;
unsigned int amount;
unsigned int i;
+ if (GNUNET_YES == in_shutdown || GNUNET_YES == post_test)
+ {
+ return;
+ }
+
+ GNUNET_assert (NULL != peer->rps_handle);
+
// TODO if malicious don't seed mal peers
amount = round (.5 * num_peers);
// TODO if malicious don't seed mal peers
amount = round (.5 * num_peers);
@@
-953,6
+960,8
@@
rps_connect_complete_cb (void *cls,
struct RPSPeer *rps_peer = cls;
struct GNUNET_RPS_Handle *rps = ca_result;
struct RPSPeer *rps_peer = cls;
struct GNUNET_RPS_Handle *rps = ca_result;
+ GNUNET_assert (NULL != ca_result);
+
if (GNUNET_YES == in_shutdown || GNUNET_YES == post_test)
{
return;
if (GNUNET_YES == in_shutdown || GNUNET_YES == post_test)
{
return;
@@
-996,9
+1005,11
@@
rps_connect_adapter (void *cls,
struct GNUNET_RPS_Handle *h;
h = GNUNET_RPS_connect (cfg);
struct GNUNET_RPS_Handle *h;
h = GNUNET_RPS_connect (cfg);
+ GNUNET_assert (NULL != h);
if (NULL != cur_test_run.pre_test)
cur_test_run.pre_test (cls, h);
if (NULL != cur_test_run.pre_test)
cur_test_run.pre_test (cls, h);
+ GNUNET_assert (NULL != h);
return h;
}
return h;
}
@@
-2839,7
+2850,7
@@
main (int argc, char *argv[])
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "This is the profiler\n");
cur_test_run.name = "test-rps-profiler";
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "This is the profiler\n");
cur_test_run.name = "test-rps-profiler";
- num_peers = 1
00
;
+ num_peers = 1
6
;
mal_type = 3;
cur_test_run.init_peer = profiler_init_peer;
//cur_test_run.pre_test = mal_pre;
mal_type = 3;
cur_test_run.init_peer = profiler_init_peer;
//cur_test_run.pre_test = mal_pre;
@@
-2905,6
+2916,7
@@
main (int argc, char *argv[])
}
ret_value = cur_test_run.eval_cb();
}
ret_value = cur_test_run.eval_cb();
+
if (NO_COLLECT_VIEW == cur_test_run.have_collect_view)
{
GNUNET_array_grow (rps_peers->cur_view,
if (NO_COLLECT_VIEW == cur_test_run.have_collect_view)
{
GNUNET_array_grow (rps_peers->cur_view,