aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2014-12-14 21:48:12 +0000
committerJulius Bünger <buenger@mytum.de>2014-12-14 21:48:12 +0000
commitff7da4c447f1ee3f308ace145e5609aeabc6623a (patch)
treece4572592939777f5f4321767f6d921e16af15fa /src
parent8593793dba2503e40731b009341c78bd9b25835e (diff)
downloadgnunet-ff7da4c447f1ee3f308ace145e5609aeabc6623a.tar.gz
gnunet-ff7da4c447f1ee3f308ace145e5609aeabc6623a.zip
fixed error
Signed-off-by: Julius Bünger <buenger@mytum.de>
Diffstat (limited to 'src')
-rw-r--r--src/rps/gnunet-service-rps.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index dbfa3387b..811cb5bff 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -273,14 +273,15 @@ SAMPLER_samplers_init(size_t init_size)
273 samplers = GNUNET_new(struct Samplers); 273 samplers = GNUNET_new(struct Samplers);
274 samplers->size = 0; 274 samplers->size = 0;
275 samplers->head = samplers->tail = NULL; 275 samplers->head = samplers->tail = NULL;
276 samplers->peer_ids = GNUNET_new_array(init_size, struct GNUNET_PeerIdentity); 276 samplers->peer_ids = NULL;
277 //samplers->peer_ids = GNUNET_new_array(init_size, struct GNUNET_PeerIdentity);
277 278
278 for ( i = 0 ; i < init_size ; i++ ) 279 for ( i = 0 ; i < init_size ; i++ )
279 { 280 {
280 GNUNET_array_append(samplers->peer_ids, 281 GNUNET_array_append(samplers->peer_ids,
281 samplers->size, 282 samplers->size,
282 *own_identity); 283 *own_identity);
283 samplers->size++; 284 //samplers->size++;
284 s = SAMPLER_init(&samplers->peer_ids[i]); 285 s = SAMPLER_init(&samplers->peer_ids[i]);
285 GNUNET_CONTAINER_DLL_insert_tail(samplers->head, 286 GNUNET_CONTAINER_DLL_insert_tail(samplers->head,
286 samplers->tail, 287 samplers->tail,
@@ -828,7 +829,7 @@ handle_peer_push (void *cls,
828 829
829 /* Add the sending peer to the push_list */ 830 /* Add the sending peer to the push_list */
830 GNUNET_array_append(push_list, push_list_size, *peer); 831 GNUNET_array_append(push_list, push_list_size, *peer);
831 push_list_size ++; 832 //push_list_size ++;
832 833
833 return GNUNET_OK; 834 return GNUNET_OK;
834} 835}
@@ -913,7 +914,7 @@ handle_peer_pull_reply (void *cls,
913 peers = (struct GNUNET_PeerIdentity *) &msg[1]; 914 peers = (struct GNUNET_PeerIdentity *) &msg[1];
914 for ( i = 0 ; i < GNUNET_ntohll(in_msg->num_peers) ; i++ ) { 915 for ( i = 0 ; i < GNUNET_ntohll(in_msg->num_peers) ; i++ ) {
915 GNUNET_array_append(pull_list, pull_list_size, peers[i]); 916 GNUNET_array_append(pull_list, pull_list_size, peers[i]);
916 pull_list_size++; 917 //pull_list_size++;
917 } 918 }
918 919
919 // TODO maybe a disconnect happens here 920 // TODO maybe a disconnect happens here