-rps: open channel when inserting peer in view
[oweals/gnunet.git] / src / testbed / gnunet-service-testbed_peers.c
index f1359003d44fc8953b71c8543176e261bdd872e5..9c12c25a6ba621ad9264ffb38bde6b731f6b66ab 100644 (file)
@@ -1,6 +1,6 @@
 /*
   This file is part of GNUnet.
-  (C) 2008--2013 Christian Grothoff (and other contributing authors)
+  Copyright (C) 2008--2013 GNUnet e.V.
 
   GNUnet is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
   You should have received a copy of the GNU General Public License
   along with GNUnet; see the file COPYING.  If not, write to the
-  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-  Boston, MA 02111-1307, USA.
+  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+  Boston, MA 02110-1301, USA.
 */
 
 
@@ -211,16 +211,14 @@ peer_list_remove (struct Peer *peer)
  * timed out
  *
  * @param cls the FowardedOperationContext
- * @param tc the TaskContext from the scheduler
  */
 static void
-peer_create_forward_timeout (void *cls,
-                             const struct GNUNET_SCHEDULER_TaskContext *tc)
+peer_create_forward_timeout (void *cls)
 {
   struct ForwardedOperationContext *fopc = cls;
 
   GNUNET_free (fopc->cls);
-  GST_forwarded_operation_timeout (fopc, tc);
+  GST_forwarded_operation_timeout (fopc);
 }
 
 
@@ -431,14 +429,15 @@ GST_handle_peer_create (void *cls, struct GNUNET_SERVER_Client *client,
 
 
 /**
- * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_DESTROYPEER messages
+ * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_DESTROYPEER messages
  *
  * @param cls NULL
  * @param client identification of the client
  * @param message the actual message
  */
 void
-GST_handle_peer_destroy (void *cls, struct GNUNET_SERVER_Client *client,
+GST_handle_peer_destroy (void *cls,
+                         struct GNUNET_SERVER_Client *client,
                          const struct GNUNET_MessageHeader *message)
 {
   const struct GNUNET_TESTBED_PeerDestroyMessage *msg;
@@ -448,8 +447,9 @@ GST_handle_peer_destroy (void *cls, struct GNUNET_SERVER_Client *client,
 
   msg = (const struct GNUNET_TESTBED_PeerDestroyMessage *) message;
   peer_id = ntohl (msg->peer_id);
-  LOG_DEBUG ("Received peer destory on peer: %u and operation id: %ul\n",
-             peer_id, GNUNET_ntohll (msg->operation_id));
+  LOG_DEBUG ("Received peer destory on peer: %u and operation id: %llu\n",
+             (unsigned int) peer_id,
+             (unsigned long long) GNUNET_ntohll (msg->operation_id));
   if (!VALID_PEER_ID (peer_id))
   {
     LOG (GNUNET_ERROR_TYPE_ERROR,
@@ -496,7 +496,7 @@ GST_handle_peer_destroy (void *cls, struct GNUNET_SERVER_Client *client,
  * Stats a peer
  *
  * @param peer the peer to start
- * @return GNUNET_OK upon success; GNUNET_SYSERR upon failure
+ * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
  */
 static int
 start_peer (struct Peer *peer)
@@ -513,7 +513,7 @@ start_peer (struct Peer *peer)
  * Stops a peer
  *
  * @param peer the peer to stop
- * @return GNUNET_OK upon success; GNUNET_SYSERR upon failure
+ * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
  */
 static int
 stop_peer (struct Peer *peer)