aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rps/gnunet-service-rps.c')
-rw-r--r--src/rps/gnunet-service-rps.c160
1 files changed, 79 insertions, 81 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index af06cf1bd..91d4840bb 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 3 Copyright (C) 2013-2015 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -149,16 +149,14 @@ static struct RPS_Sampler *prot_sampler;
149 */ 149 */
150static struct RPS_Sampler *client_sampler; 150static struct RPS_Sampler *client_sampler;
151 151
152
153/** 152/**
154 * Name to log view to 153 * Name to log view to
155 */ 154 */
156static char *file_name_view_log; 155static char *file_name_view_log;
157 156
158
159/** 157/**
160 * The size of sampler we need to be able to satisfy the client's need of 158 * The size of sampler we need to be able to satisfy the client's need
161 * random peers. 159 * of random peers.
162 */ 160 */
163static unsigned int sampler_size_client_need; 161static unsigned int sampler_size_client_need;
164 162
@@ -170,7 +168,6 @@ static unsigned int sampler_size_client_need;
170 */ 168 */
171static unsigned int sampler_size_est_need; 169static unsigned int sampler_size_est_need;
172 170
173
174/** 171/**
175 * Percentage of total peer number in the view 172 * Percentage of total peer number in the view
176 * to send random PUSHes to 173 * to send random PUSHes to
@@ -184,12 +181,6 @@ static float alpha;
184static float beta; 181static float beta;
185 182
186/** 183/**
187 * The percentage gamma of history updates.
188 * Simply 1 - alpha - beta
189 */
190
191
192/**
193 * Identifier for the main task that runs periodically. 184 * Identifier for the main task that runs periodically.
194 */ 185 */
195static struct GNUNET_SCHEDULER_Task *do_round_task; 186static struct GNUNET_SCHEDULER_Task *do_round_task;
@@ -199,8 +190,6 @@ static struct GNUNET_SCHEDULER_Task *do_round_task;
199 */ 190 */
200static struct GNUNET_TIME_Relative round_interval; 191static struct GNUNET_TIME_Relative round_interval;
201 192
202
203
204/** 193/**
205 * List to store peers received through pushes temporary. 194 * List to store peers received through pushes temporary.
206 */ 195 */
@@ -211,7 +200,6 @@ static struct CustomPeerMap *push_map;
211 */ 200 */
212static struct CustomPeerMap *pull_map; 201static struct CustomPeerMap *pull_map;
213 202
214
215/** 203/**
216 * Handler to NSE. 204 * Handler to NSE.
217 */ 205 */
@@ -230,8 +218,7 @@ static struct GNUNET_PEERINFO_Handle *peerinfo_handle;
230/** 218/**
231 * Handle for cancellation of iteration over peers. 219 * Handle for cancellation of iteration over peers.
232 */ 220 */
233struct GNUNET_PEERINFO_NotifyContext *peerinfo_notify_handle; 221static struct GNUNET_PEERINFO_NotifyContext *peerinfo_notify_handle;
234
235 222
236/** 223/**
237 * Request counter. 224 * Request counter.
@@ -263,13 +250,12 @@ static struct GNUNET_TIME_Relative request_deltas[REQUEST_DELTAS_SIZE];
263/** 250/**
264 * The prediction of the rate of requests 251 * The prediction of the rate of requests
265 */ 252 */
266static struct GNUNET_TIME_Relative request_rate; 253static struct GNUNET_TIME_Relative request_rate;
267
268 254
269/** 255/**
270 * Number of history update tasks. 256 * Number of history update tasks.
271 */ 257 */
272uint32_t num_hist_update_tasks; 258static uint32_t num_hist_update_tasks;
273 259
274 260
275#ifdef ENABLE_MALICIOUS 261#ifdef ENABLE_MALICIOUS
@@ -281,18 +267,18 @@ uint32_t num_hist_update_tasks;
281 * 2 Try to partition the network 267 * 2 Try to partition the network
282 * 3 Combined attack 268 * 3 Combined attack
283 */ 269 */
284uint32_t mal_type = 0; 270static uint32_t mal_type;
285 271
286/** 272/**
287 * Other malicious peers 273 * Other malicious peers
288 */ 274 */
289static struct GNUNET_PeerIdentity *mal_peers = NULL; 275static struct GNUNET_PeerIdentity *mal_peers;
290 276
291/** 277/**
292 * Hashmap of malicious peers used as set. 278 * Hashmap of malicious peers used as set.
293 * Used to more efficiently check whether we know that peer. 279 * Used to more efficiently check whether we know that peer.
294 */ 280 */
295static struct GNUNET_CONTAINER_MultiPeerMap *mal_peer_set = NULL; 281static struct GNUNET_CONTAINER_MultiPeerMap *mal_peer_set;
296 282
297/** 283/**
298 * Number of other malicious peers 284 * Number of other malicious peers
@@ -320,26 +306,25 @@ struct AttackedPeer
320/** 306/**
321 * If type is 2 this is the DLL of attacked peers 307 * If type is 2 this is the DLL of attacked peers
322 */ 308 */
323static struct AttackedPeer *att_peers_head = NULL; 309static struct AttackedPeer *att_peers_head;
324static struct AttackedPeer *att_peers_tail = NULL; 310static struct AttackedPeer *att_peers_tail;
325 311
326/** 312/**
327 * This index is used to point to an attacked peer to 313 * This index is used to point to an attacked peer to
328 * implement the round-robin-ish way to select attacked peers. 314 * implement the round-robin-ish way to select attacked peers.
329 */ 315 */
330static struct AttackedPeer *att_peer_index = NULL; 316static struct AttackedPeer *att_peer_index;
331 317
332/** 318/**
333 * Hashmap of attacked peers used as set. 319 * Hashmap of attacked peers used as set.
334 * Used to more efficiently check whether we know that peer. 320 * Used to more efficiently check whether we know that peer.
335 */ 321 */
336static struct GNUNET_CONTAINER_MultiPeerMap *att_peer_set = NULL; 322static struct GNUNET_CONTAINER_MultiPeerMap *att_peer_set;
337 323
338/** 324/**
339 * Number of attacked peers 325 * Number of attacked peers
340 */ 326 */
341static uint32_t num_attacked_peers = 0; 327static uint32_t num_attacked_peers;
342
343 328
344/** 329/**
345 * If type is 1 this is the attacked peer 330 * If type is 1 this is the attacked peer
@@ -362,10 +347,6 @@ static uint32_t push_limit = 10000;
362***********************************************************************/ 347***********************************************************************/
363 348
364 349
365
366
367
368
369/*********************************************************************** 350/***********************************************************************
370 * Util functions 351 * Util functions
371***********************************************************************/ 352***********************************************************************/
@@ -374,8 +355,9 @@ static uint32_t push_limit = 10000;
374/** 355/**
375 * Print peerlist to log. 356 * Print peerlist to log.
376 */ 357 */
377void 358static void
378print_peer_list (struct GNUNET_PeerIdentity *list, unsigned int len) 359print_peer_list (struct GNUNET_PeerIdentity *list,
360 unsigned int len)
379{ 361{
380 unsigned int i; 362 unsigned int i;
381 363
@@ -395,7 +377,7 @@ print_peer_list (struct GNUNET_PeerIdentity *list, unsigned int len)
395/** 377/**
396 * Remove peer from list. 378 * Remove peer from list.
397 */ 379 */
398 void 380static void
399rem_from_list (struct GNUNET_PeerIdentity **peer_list, 381rem_from_list (struct GNUNET_PeerIdentity **peer_list,
400 unsigned int *list_size, 382 unsigned int *list_size,
401 const struct GNUNET_PeerIdentity *peer) 383 const struct GNUNET_PeerIdentity *peer)
@@ -429,9 +411,10 @@ rem_from_list (struct GNUNET_PeerIdentity **peer_list,
429 411
430/** 412/**
431 * Sum all time relatives of an array. 413 * Sum all time relatives of an array.
432 */ 414 */
433 struct GNUNET_TIME_Relative 415static struct GNUNET_TIME_Relative
434T_relative_sum (const struct GNUNET_TIME_Relative *rel_array, uint32_t arr_size) 416T_relative_sum (const struct GNUNET_TIME_Relative *rel_array,
417 uint32_t arr_size)
435{ 418{
436 struct GNUNET_TIME_Relative sum; 419 struct GNUNET_TIME_Relative sum;
437 uint32_t i; 420 uint32_t i;
@@ -448,18 +431,23 @@ T_relative_sum (const struct GNUNET_TIME_Relative *rel_array, uint32_t arr_size)
448/** 431/**
449 * Compute the average of given time relatives. 432 * Compute the average of given time relatives.
450 */ 433 */
451 struct GNUNET_TIME_Relative 434static struct GNUNET_TIME_Relative
452T_relative_avg (const struct GNUNET_TIME_Relative *rel_array, uint32_t arr_size) 435T_relative_avg (const struct GNUNET_TIME_Relative *rel_array,
436 uint32_t arr_size)
453{ 437{
454 return GNUNET_TIME_relative_divide (T_relative_sum (rel_array, arr_size), arr_size); 438 return GNUNET_TIME_relative_divide (T_relative_sum (rel_array,
439 arr_size),
440 arr_size);
455} 441}
456 442
457 443
458/** 444/**
459 * Put random peer from sampler into the view as history update. 445 * Put random peer from sampler into the view as history update.
460 */ 446 */
461 void 447static void
462hist_update (void *cls, struct GNUNET_PeerIdentity *ids, uint32_t num_peers) 448hist_update (void *cls,
449 struct GNUNET_PeerIdentity *ids,
450 uint32_t num_peers)
463{ 451{
464 unsigned int i; 452 unsigned int i;
465 453
@@ -475,7 +463,6 @@ hist_update (void *cls, struct GNUNET_PeerIdentity *ids, uint32_t num_peers)
475} 463}
476 464
477 465
478
479/** 466/**
480 * Wrapper around #RPS_sampler_resize() 467 * Wrapper around #RPS_sampler_resize()
481 * 468 *
@@ -526,7 +513,7 @@ client_resize_wrapper ()
526 * 513 *
527 * Called every time we receive a request from the client. 514 * Called every time we receive a request from the client.
528 */ 515 */
529 void 516static void
530est_request_rate() 517est_request_rate()
531{ 518{
532 struct GNUNET_TIME_Relative max_round_duration; 519 struct GNUNET_TIME_Relative max_round_duration;
@@ -647,28 +634,33 @@ send_pull_reply (const struct GNUNET_PeerIdentity *peer_id,
647 * 634 *
648 * Called once we know a peer is live. 635 * Called once we know a peer is live.
649 */ 636 */
650 void 637static void
651insert_in_pull_map (void *cls, const struct GNUNET_PeerIdentity *peer) 638insert_in_pull_map (void *cls,
639 const struct GNUNET_PeerIdentity *peer)
652{ 640{
653 CustomPeerMap_put (pull_map, peer); 641 CustomPeerMap_put (pull_map, peer);
654} 642}
655 643
644
656/** 645/**
657 * Insert PeerID in #view 646 * Insert PeerID in #view
658 * 647 *
659 * Called once we know a peer is live. 648 * Called once we know a peer is live.
660 */ 649 */
661 void 650static void
662insert_in_view (void *cls, const struct GNUNET_PeerIdentity *peer) 651insert_in_view (void *cls,
652 const struct GNUNET_PeerIdentity *peer)
663{ 653{
664 View_put (peer); 654 View_put (peer);
665} 655}
666 656
657
667/** 658/**
668 * Update sampler with given PeerID. 659 * Update sampler with given PeerID.
669 */ 660 */
670 void 661static void
671insert_in_sampler (void *cls, const struct GNUNET_PeerIdentity *peer) 662insert_in_sampler (void *cls,
663 const struct GNUNET_PeerIdentity *peer)
672{ 664{
673 LOG (GNUNET_ERROR_TYPE_DEBUG, 665 LOG (GNUNET_ERROR_TYPE_DEBUG,
674 "Updating samplers with peer %s from insert_in_sampler()\n", 666 "Updating samplers with peer %s from insert_in_sampler()\n",
@@ -875,6 +867,7 @@ destroy_reply_cls (struct ReplyCls *rep_cls)
875 GNUNET_free (rep_cls); 867 GNUNET_free (rep_cls);
876} 868}
877 869
870
878static void 871static void
879destroy_cli_ctx (struct ClientContext *cli_ctx) 872destroy_cli_ctx (struct ClientContext *cli_ctx)
880{ 873{
@@ -899,8 +892,9 @@ destroy_cli_ctx (struct ClientContext *cli_ctx)
899 * Updates sizes of sampler list and view and adapt those lists 892 * Updates sizes of sampler list and view and adapt those lists
900 * accordingly. 893 * accordingly.
901 */ 894 */
902 void 895static void
903nse_callback (void *cls, struct GNUNET_TIME_Absolute timestamp, 896nse_callback (void *cls,
897 struct GNUNET_TIME_Absolute timestamp,
904 double logestimate, double std_dev) 898 double logestimate, double std_dev)
905{ 899{
906 double estimate; 900 double estimate;
@@ -933,7 +927,7 @@ nse_callback (void *cls, struct GNUNET_TIME_Absolute timestamp,
933 * 927 *
934 * Sends those to the requesting client. 928 * Sends those to the requesting client.
935 */ 929 */
936void 930static void
937client_respond (void *cls, 931client_respond (void *cls,
938 struct GNUNET_PeerIdentity *peer_ids, 932 struct GNUNET_PeerIdentity *peer_ids,
939 uint32_t num_peers) 933 uint32_t num_peers)
@@ -1080,7 +1074,7 @@ handle_client_request_cancel (void *cls,
1080 * @param client identification of the client 1074 * @param client identification of the client
1081 * @param message the actual message 1075 * @param message the actual message
1082 */ 1076 */
1083 static void 1077static void
1084handle_client_seed (void *cls, 1078handle_client_seed (void *cls,
1085 struct GNUNET_SERVER_Client *client, 1079 struct GNUNET_SERVER_Client *client,
1086 const struct GNUNET_MessageHeader *message) 1080 const struct GNUNET_MessageHeader *message)
@@ -1136,7 +1130,7 @@ handle_client_seed (void *cls,
1136 ////GNUNET_free (peers); 1130 ////GNUNET_free (peers);
1137 1131
1138 GNUNET_SERVER_receive_done (client, 1132 GNUNET_SERVER_receive_done (client,
1139 GNUNET_OK); 1133 GNUNET_OK);
1140} 1134}
1141 1135
1142 1136
@@ -1153,9 +1147,9 @@ handle_client_seed (void *cls,
1153 */ 1147 */
1154static int 1148static int
1155handle_peer_push (void *cls, 1149handle_peer_push (void *cls,
1156 struct GNUNET_CADET_Channel *channel, 1150 struct GNUNET_CADET_Channel *channel,
1157 void **channel_ctx, 1151 void **channel_ctx,
1158 const struct GNUNET_MessageHeader *msg) 1152 const struct GNUNET_MessageHeader *msg)
1159{ 1153{
1160 const struct GNUNET_PeerIdentity *peer; 1154 const struct GNUNET_PeerIdentity *peer;
1161 1155
@@ -1165,9 +1159,11 @@ handle_peer_push (void *cls,
1165 GNUNET_CADET_channel_get_info (channel, GNUNET_CADET_OPTION_PEER); 1159 GNUNET_CADET_channel_get_info (channel, GNUNET_CADET_OPTION_PEER);
1166 // FIXME wait for cadet to change this function 1160 // FIXME wait for cadet to change this function
1167 1161
1168 LOG (GNUNET_ERROR_TYPE_DEBUG, "Received PUSH (%s)\n", GNUNET_i2s (peer)); 1162 LOG (GNUNET_ERROR_TYPE_DEBUG,
1163 "Received PUSH (%s)\n",
1164 GNUNET_i2s (peer));
1169 1165
1170 #ifdef ENABLE_MALICIOUS 1166#ifdef ENABLE_MALICIOUS
1171 struct AttackedPeer *tmp_att_peer; 1167 struct AttackedPeer *tmp_att_peer;
1172 1168
1173 tmp_att_peer = GNUNET_new (struct AttackedPeer); 1169 tmp_att_peer = GNUNET_new (struct AttackedPeer);
@@ -1220,9 +1216,9 @@ handle_peer_push (void *cls,
1220 */ 1216 */
1221static int 1217static int
1222handle_peer_pull_request (void *cls, 1218handle_peer_pull_request (void *cls,
1223 struct GNUNET_CADET_Channel *channel, 1219 struct GNUNET_CADET_Channel *channel,
1224 void **channel_ctx, 1220 void **channel_ctx,
1225 const struct GNUNET_MessageHeader *msg) 1221 const struct GNUNET_MessageHeader *msg)
1226{ 1222{
1227 struct GNUNET_PeerIdentity *peer; 1223 struct GNUNET_PeerIdentity *peer;
1228 const struct GNUNET_PeerIdentity *view_array; 1224 const struct GNUNET_PeerIdentity *view_array;
@@ -1272,7 +1268,7 @@ handle_peer_pull_request (void *cls,
1272 * @param channel_ctx The context associated with this channel 1268 * @param channel_ctx The context associated with this channel
1273 * @param msg The message header 1269 * @param msg The message header
1274 */ 1270 */
1275 static int 1271static int
1276handle_peer_pull_reply (void *cls, 1272handle_peer_pull_reply (void *cls,
1277 struct GNUNET_CADET_Channel *channel, 1273 struct GNUNET_CADET_Channel *channel,
1278 void **channel_ctx, 1274 void **channel_ctx,
@@ -1404,7 +1400,8 @@ handle_peer_pull_reply (void *cls,
1404 * @param spread the inverse amount of deviation from the mean 1400 * @param spread the inverse amount of deviation from the mean
1405 */ 1401 */
1406static struct GNUNET_TIME_Relative 1402static struct GNUNET_TIME_Relative
1407compute_rand_delay (struct GNUNET_TIME_Relative mean, unsigned int spread) 1403compute_rand_delay (struct GNUNET_TIME_Relative mean,
1404 unsigned int spread)
1408{ 1405{
1409 struct GNUNET_TIME_Relative half_interval; 1406 struct GNUNET_TIME_Relative half_interval;
1410 struct GNUNET_TIME_Relative ret; 1407 struct GNUNET_TIME_Relative ret;
@@ -1496,7 +1493,7 @@ do_mal_round (void *cls);
1496 * @param client The client that sent the message 1493 * @param client The client that sent the message
1497 * @param msg The message header 1494 * @param msg The message header
1498 */ 1495 */
1499 static void 1496static void
1500handle_client_act_malicious (void *cls, 1497handle_client_act_malicious (void *cls,
1501 struct GNUNET_SERVER_Client *client, 1498 struct GNUNET_SERVER_Client *client,
1502 const struct GNUNET_MessageHeader *msg) 1499 const struct GNUNET_MessageHeader *msg)
@@ -1613,8 +1610,8 @@ handle_client_act_malicious (void *cls,
1613 { 1610 {
1614 GNUNET_break (0); 1611 GNUNET_break (0);
1615 } 1612 }
1616 1613 GNUNET_SERVER_receive_done (client,
1617 GNUNET_SERVER_receive_done (client, GNUNET_OK); 1614 GNUNET_OK);
1618} 1615}
1619 1616
1620 1617
@@ -1631,7 +1628,8 @@ do_mal_round (void *cls)
1631 struct GNUNET_TIME_Relative time_next_round; 1628 struct GNUNET_TIME_Relative time_next_round;
1632 struct AttackedPeer *tmp_att_peer; 1629 struct AttackedPeer *tmp_att_peer;
1633 1630
1634 LOG (GNUNET_ERROR_TYPE_DEBUG, "Going to execute next round maliciously type %" PRIu32 ".\n", 1631 LOG (GNUNET_ERROR_TYPE_DEBUG,
1632 "Going to execute next round maliciously type %" PRIu32 ".\n",
1635 mal_type); 1633 mal_type);
1636 do_round_task = NULL; 1634 do_round_task = NULL;
1637 GNUNET_assert (mal_type <= 3); 1635 GNUNET_assert (mal_type <= 3);
@@ -1744,7 +1742,8 @@ do_mal_round (void *cls)
1744 //do_round_task = GNUNET_SCHEDULER_add_delayed (round_interval, &do_mal_round, 1742 //do_round_task = GNUNET_SCHEDULER_add_delayed (round_interval, &do_mal_round,
1745 //NULL); 1743 //NULL);
1746 GNUNET_assert (NULL == do_round_task); 1744 GNUNET_assert (NULL == do_round_task);
1747 do_round_task = GNUNET_SCHEDULER_add_delayed (time_next_round, &do_mal_round, NULL); 1745 do_round_task = GNUNET_SCHEDULER_add_delayed (time_next_round,
1746 &do_mal_round, NULL);
1748 LOG (GNUNET_ERROR_TYPE_DEBUG, "Finished round\n"); 1747 LOG (GNUNET_ERROR_TYPE_DEBUG, "Finished round\n");
1749} 1748}
1750#endif /* ENABLE_MALICIOUS */ 1749#endif /* ENABLE_MALICIOUS */
@@ -1758,8 +1757,6 @@ do_mal_round (void *cls)
1758static void 1757static void
1759do_round (void *cls) 1758do_round (void *cls)
1760{ 1759{
1761 LOG (GNUNET_ERROR_TYPE_DEBUG, "Going to execute next round.\n");
1762
1763 uint32_t i; 1760 uint32_t i;
1764 const struct GNUNET_PeerIdentity *view_array; 1761 const struct GNUNET_PeerIdentity *view_array;
1765 unsigned int *permut; 1762 unsigned int *permut;
@@ -1770,6 +1767,8 @@ do_round (void *cls)
1770 struct GNUNET_PeerIdentity peer; 1767 struct GNUNET_PeerIdentity peer;
1771 struct GNUNET_PeerIdentity *update_peer; 1768 struct GNUNET_PeerIdentity *update_peer;
1772 1769
1770 LOG (GNUNET_ERROR_TYPE_DEBUG,
1771 "Going to execute next round.\n");
1773 do_round_task = NULL; 1772 do_round_task = NULL;
1774 LOG (GNUNET_ERROR_TYPE_DEBUG, 1773 LOG (GNUNET_ERROR_TYPE_DEBUG,
1775 "Printing view:\n"); 1774 "Printing view:\n");
@@ -1967,7 +1966,8 @@ do_round (void *cls)
1967 time_next_round = compute_rand_delay (round_interval, 2); 1966 time_next_round = compute_rand_delay (round_interval, 2);
1968 1967
1969 /* Schedule next round */ 1968 /* Schedule next round */
1970 do_round_task = GNUNET_SCHEDULER_add_delayed (time_next_round, &do_round, NULL); 1969 do_round_task = GNUNET_SCHEDULER_add_delayed (time_next_round,
1970 &do_round, NULL);
1971 LOG (GNUNET_ERROR_TYPE_DEBUG, "Finished round\n"); 1971 LOG (GNUNET_ERROR_TYPE_DEBUG, "Finished round\n");
1972} 1972}
1973 1973
@@ -2036,9 +2036,8 @@ process_peerinfo_peers (void *cls,
2036static void 2036static void
2037shutdown_task (void *cls) 2037shutdown_task (void *cls)
2038{ 2038{
2039 2039 LOG (GNUNET_ERROR_TYPE_DEBUG,
2040 LOG (GNUNET_ERROR_TYPE_DEBUG, "RPS is going down\n"); 2040 "RPS is going down\n");
2041
2042 GNUNET_PEERINFO_notify_cancel (peerinfo_notify_handle); 2041 GNUNET_PEERINFO_notify_cancel (peerinfo_notify_handle);
2043 GNUNET_PEERINFO_disconnect (peerinfo_handle); 2042 GNUNET_PEERINFO_disconnect (peerinfo_handle);
2044 2043
@@ -2153,9 +2152,8 @@ rps_start (struct GNUNET_SERVER_Handle *server)
2153 do_round_task = GNUNET_SCHEDULER_add_now (&do_round, NULL); 2152 do_round_task = GNUNET_SCHEDULER_add_now (&do_round, NULL);
2154 LOG (GNUNET_ERROR_TYPE_DEBUG, "Scheduled first round\n"); 2153 LOG (GNUNET_ERROR_TYPE_DEBUG, "Scheduled first round\n");
2155 2154
2156 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, 2155 GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
2157 &shutdown_task, 2156 NULL);
2158 NULL);
2159} 2157}
2160 2158
2161 2159