diff options
author | Florian Dold <florian.dold@gmail.com> | 2013-04-11 10:08:52 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2013-04-11 10:08:52 +0000 |
commit | 210be82b7cdc6058401e7d5042aa50dd0b750c92 (patch) | |
tree | e2bfa5a87038ef0a7f906d5ede8d6e7ea7f2638b /src/dv/gnunet-service-dv.c | |
parent | 2b406c1533a919057cda8850315af1fca5b48a45 (diff) | |
download | gnunet-210be82b7cdc6058401e7d5042aa50dd0b750c92.tar.gz gnunet-210be82b7cdc6058401e7d5042aa50dd0b750c92.zip |
added consensus log-round simulation, work on consensus service, still problems with dv test case
Diffstat (limited to 'src/dv/gnunet-service-dv.c')
-rw-r--r-- | src/dv/gnunet-service-dv.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 89f109345..6dc37f7d9 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -1247,10 +1247,8 @@ insert_next_element (void *cls, | |||
1247 | * | 1247 | * |
1248 | * @param cls the 'struct DirectNeighbor' we're building the consensus with | 1248 | * @param cls the 'struct DirectNeighbor' we're building the consensus with |
1249 | * @param element the new element we have learned | 1249 | * @param element the new element we have learned |
1250 | * @return GNUNET_OK if the valid is well-formed and should be added to the consensus, | ||
1251 | * GNUNET_SYSERR if the element should be ignored and not be propagated | ||
1252 | */ | 1250 | */ |
1253 | static int | 1251 | static void |
1254 | learn_route_cb (void *cls, | 1252 | learn_route_cb (void *cls, |
1255 | const struct GNUNET_CONSENSUS_Element *element) | 1253 | const struct GNUNET_CONSENSUS_Element *element) |
1256 | { | 1254 | { |
@@ -1274,12 +1272,12 @@ learn_route_cb (void *cls, | |||
1274 | neighbor->consensus_task = GNUNET_SCHEDULER_add_delayed (GNUNET_DV_CONSENSUS_FREQUENCY, | 1272 | neighbor->consensus_task = GNUNET_SCHEDULER_add_delayed (GNUNET_DV_CONSENSUS_FREQUENCY, |
1275 | &start_consensus, | 1273 | &start_consensus, |
1276 | neighbor); | 1274 | neighbor); |
1277 | return GNUNET_SYSERR; | 1275 | return; |
1278 | } | 1276 | } |
1279 | if (sizeof (struct Target) != element->size) | 1277 | if (sizeof (struct Target) != element->size) |
1280 | { | 1278 | { |
1281 | GNUNET_break_op (0); | 1279 | GNUNET_break_op (0); |
1282 | return GNUNET_SYSERR; | 1280 | return; |
1283 | } | 1281 | } |
1284 | target = GNUNET_malloc (sizeof (struct Target)); | 1282 | target = GNUNET_malloc (sizeof (struct Target)); |
1285 | memcpy (target, element->data, sizeof (struct Target)); | 1283 | memcpy (target, element->data, sizeof (struct Target)); |
@@ -1291,9 +1289,8 @@ learn_route_cb (void *cls, | |||
1291 | { | 1289 | { |
1292 | GNUNET_break_op (0); | 1290 | GNUNET_break_op (0); |
1293 | GNUNET_free (target); | 1291 | GNUNET_free (target); |
1294 | return GNUNET_SYSERR; | 1292 | return; |
1295 | } | 1293 | } |
1296 | return GNUNET_OK; | ||
1297 | } | 1294 | } |
1298 | 1295 | ||
1299 | 1296 | ||