refactor DHT for new service API
[oweals/gnunet.git] / src / cadet / gnunet-service-cadet_tunnel.c
index 0ede4a8861a918fddf03fa31dccfc62fabc06799..e60c3c0239b70d2b4f074ef17902cb0462b4e32f 100644 (file)
@@ -1600,7 +1600,6 @@ send_kx (struct CadetTunnel *t,
     {
       GNUNET_break (0);
       GCT_debug (t, GNUNET_ERROR_TYPE_ERROR);
-      GCP_debug (t->peer, GNUNET_ERROR_TYPE_ERROR);
     }
     return NULL;
   }
@@ -2245,6 +2244,10 @@ GCT_handle_encrypted (struct CadetTunnel *t,
  *
  * @param t Tunnel on which the message came.
  * @param message Payload of KX message.
+ *
+ * FIXME: not needed anymore
+ *  - substitute with call to kx_ax
+ *  - eliminate encapsulation
  */
 void
 GCT_handle_kx (struct CadetTunnel *t,
@@ -3366,34 +3369,6 @@ GCT_send_ax_kx (struct CadetTunnel *t, int force_reply)
 }
 
 
-/**
- * Sends an already built and encrypted message on a tunnel, choosing the best
- * connection. Useful for re-queueing messages queued on a destroyed connection.
- *
- * @param message Message to send. Function modifies it.
- * @param t Tunnel on which this message is transmitted.
- */
-void
-GCT_resend_message (const struct GNUNET_MessageHeader *message,
-                    struct CadetTunnel *t)
-{
-  struct CadetConnection *c;
-  int fwd;
-
-  c = tunnel_get_connection (t);
-  if (NULL == c)
-  {
-    /* TODO queue in tunnel, marked as encrypted */
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "No connection available, dropping.\n");
-    return;
-  }
-  fwd = GCC_is_origin (c, GNUNET_YES);
-  GNUNET_break (NULL == GCC_send_prebuilt_message (message, UINT16_MAX, 0,
-                                                   c, fwd,
-                                                   GNUNET_YES, NULL, NULL));
-}
-
-
 /**
  * Is the tunnel directed towards the local peer?
  *