diff options
author | Julius Bünger <buenger@mytum.de> | 2018-01-07 22:10:21 +0100 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2018-01-07 22:33:08 +0100 |
commit | 5511ea2d4ce4e62120528272881b477ca6f6877c (patch) | |
tree | 9b5421c779bf9c127de1c45782c46ac40703933d /src/rps | |
parent | 875ed6d7e948fb57959929f9079c5a160ca04c42 (diff) | |
download | gnunet-5511ea2d4ce4e62120528272881b477ca6f6877c.tar.gz gnunet-5511ea2d4ce4e62120528272881b477ca6f6877c.zip |
rps tests: sanity checks and cosmetics
Diffstat (limited to 'src/rps')
-rw-r--r-- | src/rps/test_rps.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c index 584d26c26..9f3044dcc 100644 --- a/src/rps/test_rps.c +++ b/src/rps/test_rps.c | |||
@@ -1181,7 +1181,7 @@ churn_cb (void *cls, | |||
1181 | 1181 | ||
1182 | num_peers_online += entry->delta; | 1182 | num_peers_online += entry->delta; |
1183 | 1183 | ||
1184 | if (0 > entry->delta) | 1184 | if (-1 == entry->delta) |
1185 | { /* Peer hopefully just went offline */ | 1185 | { /* Peer hopefully just went offline */ |
1186 | if (GNUNET_YES != rps_peers[entry->index].online) | 1186 | if (GNUNET_YES != rps_peers[entry->index].online) |
1187 | { | 1187 | { |
@@ -1222,6 +1222,12 @@ churn_cb (void *cls, | |||
1222 | } | 1222 | } |
1223 | rps_peers[entry->index].online = GNUNET_YES; | 1223 | rps_peers[entry->index].online = GNUNET_YES; |
1224 | } | 1224 | } |
1225 | else | ||
1226 | { | ||
1227 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
1228 | "Invalid value for delta: %i\n", entry->delta); | ||
1229 | GNUNET_break (0); | ||
1230 | } | ||
1225 | 1231 | ||
1226 | GNUNET_CONTAINER_DLL_remove (oplist_head, oplist_tail, entry); | 1232 | GNUNET_CONTAINER_DLL_remove (oplist_head, oplist_tail, entry); |
1227 | rps_peers[entry->index].entry_op_manage = NULL; | 1233 | rps_peers[entry->index].entry_op_manage = NULL; |
@@ -1743,10 +1749,10 @@ main (int argc, char *argv[]) | |||
1743 | 1749 | ||
1744 | ok = 1; | 1750 | ok = 1; |
1745 | ret_value = GNUNET_TESTBED_test_run (cur_test_run.name, | 1751 | ret_value = GNUNET_TESTBED_test_run (cur_test_run.name, |
1746 | "test_rps.conf", | 1752 | "test_rps.conf", |
1747 | num_peers, | 1753 | num_peers, |
1748 | 0, NULL, NULL, | 1754 | 0, NULL, NULL, |
1749 | &run, NULL); | 1755 | &run, NULL); |
1750 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1756 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1751 | "_test_run returned.\n"); | 1757 | "_test_run returned.\n"); |
1752 | if (GNUNET_OK != ret_value) | 1758 | if (GNUNET_OK != ret_value) |