-ensure stats queues do not grow too big
[oweals/gnunet.git] / src / transport / gnunet-service-transport_clients.c
index 86c833c5bc41a4764097e6d2d8dbd0dd1047838a..953ea54e51c76b5feca8cdc493c1aaf921e70458 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2010-2015 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2010-2015 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
@@ -875,43 +875,6 @@ clients_handle_send (void *cls,
 }
 
 
-/**
- * Handle request connect message
- *
- * @param cls closure (always NULL)
- * @param client identification of the client
- * @param message the actual message
- */
-static void
-clients_handle_request_connect (void *cls,
-                                struct GNUNET_SERVER_Client *client,
-                                const struct GNUNET_MessageHeader *message)
-{
-  const struct TransportRequestConnectMessage *trcm;
-
-  trcm = (const struct TransportRequestConnectMessage *) message;
-  GNUNET_break (0 == ntohl (trcm->reserved));
-  GNUNET_STATISTICS_update (GST_stats,
-                            gettext_noop
-                            ("# REQUEST CONNECT messages received"), 1,
-                            GNUNET_NO);
-  if (0 == memcmp (&trcm->peer,
-                   &GST_my_identity,
-                   sizeof (struct GNUNET_PeerIdentity)))
-  {
-    GNUNET_break (0);
-    GNUNET_SERVER_receive_done (client,
-                                GNUNET_OK);
-    return;
-  }
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Received a request connect message for peer `%s'\n",
-              GNUNET_i2s (&trcm->peer));
-  GST_neighbours_try_connect (&trcm->peer);
-  GNUNET_SERVER_receive_done (client, GNUNET_OK);
-}
-
-
 /**
  * Take the given address and append it to the set of results sent back to
  * the client.  This function may be called serveral times for a single
@@ -1546,9 +1509,6 @@ GST_clients_start (struct GNUNET_SERVER_Handle *server)
      GNUNET_MESSAGE_TYPE_HELLO, 0},
     {&clients_handle_send, NULL,
      GNUNET_MESSAGE_TYPE_TRANSPORT_SEND, 0},
-    {&clients_handle_request_connect, NULL,
-     GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_CONNECT,
-     sizeof (struct TransportRequestConnectMessage)},
     {&clients_handle_address_to_string, NULL,
      GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING, 0},
     {&clients_handle_monitor_peers, NULL,