[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34557 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34557 - gnunet/src/rps |
Date: |
Sun, 14 Dec 2014 22:48:07 +0100 |
Author: ch3
Date: 2014-12-14 22:48:07 +0100 (Sun, 14 Dec 2014)
New Revision: 34557
Modified:
gnunet/src/rps/gnunet-service-rps.c
Log:
Completely got rid of SList
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:04 UTC (rev 34556)
+++ gnunet/src/rps/gnunet-service-rps.c 2014-12-14 21:48:07 UTC (rev 34557)
@@ -284,7 +284,7 @@
samplers->tail,
);
}
- return sammplers;
+ return samplers;
}
@@ -517,14 +517,9 @@
// TODO other events to grow/shrink size?
/**
- * List of samplers // TODO get rid of that
- */
-struct GNUNET_CONTAINER_SList *sampler_list;
-
-/**
* List of samplers.
*/
-struct Samplers *samplers; // TODO rename to sampler_list
+struct Samplers *sampler_list; // TODO rename to sampler_list
/**
* Sampler list size // TODO get rid of that
@@ -928,7 +923,6 @@
{
size_t s;
- //s = SAMPLER_count_id(samplers, id); // TODO
s = SAMPLER_count_id(sampler_list, id);
if ( 1 >= s ) {
// TODO cleanup peer
@@ -949,7 +943,6 @@
uint64_t i;
struct Sampler *s;
- struct GNUNET_CONTAINER_SList_Iterator *iter;
//unsigned int *n_arr;
struct GNUNET_RPS_P2P_PushMessage *push_msg;
struct GNUNET_RPS_P2P_PullRequestMessage *pull_msg; // FIXME Send empty
message
@@ -959,13 +952,11 @@
// TODO print lists, ...
// TODO cleanup peer_map
- iter = GNUNET_new(struct GNUNET_CONTAINER_SList_Iterator);
-
/* If the NSE has changed adapt the lists accordingly */
// TODO check nse == 0!
LOG(GNUNET_ERROR_TYPE_DEBUG, "Checking size estimate.\n");
- SAMPLER_samplers_grow(samplers, est_size);
+ SAMPLER_samplers_grow(sampler_list, est_size);
GNUNET_array_grow(gossip_list, gossip_list_size, est_size); // FIXME Do
conversion correct or change type
@@ -1048,8 +1039,8 @@
/* Update gossip list with peers from history */
tmp_index = i + round((alpha + beta) * gossip_list_size);
index = GNUNET_CRYPTO_random_u64(GNUNET_CRYPTO_QUALITY_STRONG,
- samplers->size);
- gossip_list[tmp_index] = samplers->peer_ids[index];
+ sampler_list->size);
+ gossip_list[tmp_index] = sampler_list->peer_ids[index];
// TODO change the in_flags accordingly
}
@@ -1066,13 +1057,13 @@
for ( i = 0 ; i < push_list_size ; i++ )
{
- SAMPLER_update_list(samplers, push_list[i]);
+ SAMPLER_update_list(sampler_list, push_list[i]);
// TODO set in_flag?
}
for ( i = 0 ; i < pull_list_size ; i++ )
{
- SAMPLER_update_list(samplers, pull_list[i]);
+ SAMPLER_update_list(sampler_list, pull_list[i]);
// TODO set in_flag?
}
@@ -1368,7 +1359,7 @@
/* Initialise sampler and gossip list */
struct Sampler *s;
- samplers = SAMPLER_samplers_init(est_size);
+ sampler_list = SAMPLER_samplers_init(est_size);
push_list = NULL;
push_list_size = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34557 - gnunet/src/rps,
gnunet <=