[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34560 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34560 - gnunet/src/rps |
Date: |
Sun, 14 Dec 2014 22:48:15 +0100 |
Author: ch3
Date: 2014-12-14 22:48:15 +0100 (Sun, 14 Dec 2014)
New Revision: 34560
Modified:
gnunet/src/rps/gnunet-service-rps.c
gnunet/src/rps/test_rps_multipeer.c
Log:
fixed errors
Signed-off-by: Julius B?\195?\188nger <address@hidden>
Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2014-12-14 21:48:12 UTC (rev 34559)
+++ gnunet/src/rps/gnunet-service-rps.c 2014-12-14 21:48:15 UTC (rev 34560)
@@ -300,12 +300,13 @@
SAMPLER_update_list(struct Samplers *samplers, const struct
GNUNET_PeerIdentity *id,
SAMPLER_deleteCB del_cb, void *cb_cls)
{
- struct Sampler *sampler;
+ struct Sampler *iter;
- sampler = samplers->head;
- while ( NULL != sampler->next )
+ iter = samplers->head;
+ while ( NULL != iter->next )
{
- SAMPLER_next(sampler, id, del_cb, cb_cls);
+ SAMPLER_next(iter, id, del_cb, cb_cls);
+ iter = iter->next;
}
}
@@ -430,7 +431,8 @@
for ( i = 0 ; i < samplers->size - new_size ; i++)
{
// TODO call delCB on elem?
- GNUNET_CONTAINER_DLL_remove(samplers->head, samplers->tail,
samplers->tail);
+ sampler = samplers->tail;
+ GNUNET_CONTAINER_DLL_remove(samplers->head, samplers->tail, sampler);
}
GNUNET_array_grow(samplers->peer_ids, samplers->size, new_size);
}
@@ -829,7 +831,7 @@
/* Add the sending peer to the push_list */
GNUNET_array_append(push_list, push_list_size, *peer);
- //push_list_size ++;
+ push_list_size ++;
return GNUNET_OK;
}
@@ -914,7 +916,7 @@
peers = (struct GNUNET_PeerIdentity *) &msg[1];
for ( i = 0 ; i < GNUNET_ntohll(in_msg->num_peers) ; i++ ) {
GNUNET_array_append(pull_list, pull_list_size, peers[i]);
- //pull_list_size++;
+ pull_list_size++;
}
// TODO maybe a disconnect happens here
Modified: gnunet/src/rps/test_rps_multipeer.c
===================================================================
--- gnunet/src/rps/test_rps_multipeer.c 2014-12-14 21:48:12 UTC (rev 34559)
+++ gnunet/src/rps/test_rps_multipeer.c 2014-12-14 21:48:15 UTC (rev 34560)
@@ -33,7 +33,7 @@
/**
* How many peers do we start?
*/
-#define NUM_PEERS 10
+#define NUM_PEERS 3
/**
* How long do we run the test?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34560 - gnunet/src/rps,
gnunet <=