-improve UDP logging
[oweals/gnunet.git] / src / rps / test_rps_multipeer.c
index f45558a1bcdf3d8115ba6f680b12f26bc81ede87..de5dfac567a7812c28aba5bc685469f3fd1f0292 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2012 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2009, 2012 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -121,8 +121,10 @@ request_peers (void *cls,
                const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct RPSPeer *peer = (struct RPSPeer *) cls;
+  struct GNUNET_RPS_Request_Handle *req_handle;
 
-  GNUNET_RPS_request_peers (peer->rps_handle, 1, handle_reply, NULL);
+  req_handle = GNUNET_RPS_request_peers (peer->rps_handle, 1, handle_reply, NULL);
+  GNUNET_free (req_handle);
 }
 
 
@@ -187,6 +189,8 @@ rps_connect_complete_cb (void *cls,
 {
   struct RPSPeer *peer = cls;
   struct GNUNET_RPS_Handle *rps = ca_result;
+  struct GNUNET_RPS_Request_Handle *req_handle;
+
   peer->rps_handle = rps;
 
   GNUNET_assert (op == peer->op);
@@ -201,12 +205,14 @@ rps_connect_complete_cb (void *cls,
     }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started client successfully\n");
 
-  GNUNET_RPS_request_peers (rps, 1, handle_reply, NULL);
+  req_handle = GNUNET_RPS_request_peers (rps, 1, handle_reply, NULL);
+  GNUNET_free (req_handle);
 
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10),
                                 request_peers, peer);
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10),
                                 seed_peers, peer);
+  // TODO test seeding > GNUNET_SERVER_MAX_MESSAGE_SIZE peers
 }