[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 06/07: rps tests: sanity checks and cosmetics
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 06/07: rps tests: sanity checks and cosmetics |
Date: |
Sun, 07 Jan 2018 22:33:31 +0100 |
This is an automated email from the git hooks/post-receive script.
julius-buenger pushed a commit to branch master
in repository gnunet.
commit 5511ea2d4ce4e62120528272881b477ca6f6877c
Author: Julius Bünger <address@hidden>
AuthorDate: Sun Jan 7 22:10:21 2018 +0100
rps tests: sanity checks and cosmetics
---
src/rps/test_rps.c | 16 +++++++++++-----
1 file 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,
num_peers_online += entry->delta;
- if (0 > entry->delta)
+ if (-1 == entry->delta)
{ /* Peer hopefully just went offline */
if (GNUNET_YES != rps_peers[entry->index].online)
{
@@ -1222,6 +1222,12 @@ churn_cb (void *cls,
}
rps_peers[entry->index].online = GNUNET_YES;
}
+ else
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Invalid value for delta: %i\n", entry->delta);
+ GNUNET_break (0);
+ }
GNUNET_CONTAINER_DLL_remove (oplist_head, oplist_tail, entry);
rps_peers[entry->index].entry_op_manage = NULL;
@@ -1743,10 +1749,10 @@ main (int argc, char *argv[])
ok = 1;
ret_value = GNUNET_TESTBED_test_run (cur_test_run.name,
- "test_rps.conf",
- num_peers,
- 0, NULL, NULL,
- &run, NULL);
+ "test_rps.conf",
+ num_peers,
+ 0, NULL, NULL,
+ &run, NULL);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"_test_run returned.\n");
if (GNUNET_OK != ret_value)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (608c456a6 -> 5f9face21), gnunet, 2018/01/07
- [GNUnet-SVN] [gnunet] 01/07: rps tests: comments and logging, gnunet, 2018/01/07
- [GNUnet-SVN] [gnunet] 04/07: rps tests: proper shutdown, gnunet, 2018/01/07
- [GNUnet-SVN] [gnunet] 06/07: rps tests: sanity checks and cosmetics,
gnunet <=
- [GNUnet-SVN] [gnunet] 07/07: rps tests: cosmetics, gnunet, 2018/01/07
- [GNUnet-SVN] [gnunet] 05/07: rps tests: change function signature, comments, gnunet, 2018/01/07
- [GNUnet-SVN] [gnunet] 03/07: rps tests: check whether peer was scheduled to go off/online, gnunet, 2018/01/07
- [GNUnet-SVN] [gnunet] 02/07: rps tests: make sure no callback executes after shutdown, gnunet, 2018/01/07