-ftbfs
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh-enc.c
index 45103945f5eae8cdbf73d0427d11c3144d4faad9..1767f5a1aff7acfdabd33f9cb410ca850bb3c2b6 100644 (file)
@@ -109,83 +109,6 @@ static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key;
 /******************************************************************************/
 
 
-/**
- * Get the static string for a peer ID.
- *
- * @param peer Peer.
- *
- * @return Static string for it's ID.
- */
-static const char *
-peer2s (const struct MeshPeer *peer)
-{
-  if (NULL == peer)
-    return "(NULL)";
-  return GNUNET_i2s (GNUNET_PEER_resolve2 (peer->id));
-}
-
-
-
-/**
- * Send an ACK on the appropriate connection/channel, depending on
- * the direction and the position of the peer.
- *
- * @param c Which connection to send the hop-by-hop ACK.
- * @param ch Channel, if any.
- * @param fwd Is this a fwd ACK? (will go dest->root)
- */
-static void
-send_ack (struct MeshConnection *c, struct MeshChannel *ch, int fwd)
-{
-  unsigned int buffer;
-
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "send ack %s on %p %p\n",
-              fwd ? "FWD" : "BCK", c, ch);
-  if (NULL == c || GMC_is_terminal (c, fwd))
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  getting from all connections\n");
-    buffer = tunnel_get_buffer (NULL == c ? ch->t : c->t, fwd);
-  }
-  else
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  getting from one connection\n");
-    buffer = connection_get_buffer (c, fwd);
-  }
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  buffer available: %u\n", buffer);
-
-  if ( (NULL != ch && channel_is_origin (ch, fwd)) ||
-       (NULL != c && connection_is_origin (c, fwd)) )
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  sending on channel...\n");
-    if (0 < buffer)
-    {
-      GNUNET_assert (NULL != ch);
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  really sending!\n");
-      send_local_ack (ch, fwd);
-    }
-  }
-  else if (NULL == c)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  sending on all connections\n");
-    GNUNET_assert (NULL != ch);
-    channel_send_connections_ack (ch, buffer, fwd);
-  }
-  else
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  sending on connection\n");
-    connection_send_ack (c, buffer, fwd);
-  }
-}
-
-
-
-
-
-
-
-
-
 
 /******************************************************************************/
 /****************      MESH NETWORK HANDLER HELPERS     ***********************/
@@ -193,16 +116,11 @@ send_ack (struct MeshConnection *c, struct MeshChannel *ch, int fwd)
 
 
 
-
-
-
 /******************************************************************************/
 /********************      MESH NETWORK HANDLERS     **************************/
 /******************************************************************************/
 
 
-
-
 /******************************************************************************/
 /************************      MAIN FUNCTIONS      ****************************/
 /******************************************************************************/
@@ -264,7 +182,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
   GMC_init (c);         /* Connections */
   GMP_init (c);         /* Peers */
   GMD_init (c, &my_full_id);         /* DHT */
-  GMT_init (c, &my_full_id, &my_private_key);
+  GMT_init (c, &my_full_id, my_private_key);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Mesh service running\n");
 }