transport metric manipulation
[oweals/gnunet.git] / src / transport / gnunet-service-transport_clients.c
index af9093581b78d5c025c430e64b9d203c8d294b7e..23fc7278b83af17a489a74138e7d24e4c0cf7b97 100644 (file)
@@ -30,6 +30,7 @@
 #include "gnunet-service-transport_neighbours.h"
 #include "gnunet-service-transport_plugins.h"
 #include "gnunet-service-transport_validation.h"
+#include "gnunet-service-transport_manipulation.h"
 #include "gnunet-service-transport.h"
 #include "transport.h"
 
@@ -293,11 +294,11 @@ setup_monitoring_client (struct GNUNET_SERVER_Client *client,
   GNUNET_SERVER_notification_context_add (nc, client);
 
   if (0 != memcmp (peer, &all_zeros, sizeof (struct GNUNET_PeerIdentity)))
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,,
-              "Client %p started monitoring of the peer `%s'\n",
-              mc, GNUNET_i2s (peer));
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Client %p started monitoring of the peer `%s'\n",
+                mc, GNUNET_i2s (peer));
   else
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,,
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Client %p started monitoring all peers\n", mc);
   return mc;
 }
@@ -693,7 +694,7 @@ clients_handle_send (void *cls, struct GNUNET_SERVER_Client *client,
   stcc->target = obm->peer;
   stcc->client = client;
   GNUNET_SERVER_client_keep (client);
-  GST_neighbours_send (&obm->peer, obmm, msize,
+  GST_manipulation_send (&obm->peer, obmm, msize,
                        GNUNET_TIME_relative_ntoh (obm->timeout),
                        &handle_send_transmit_continuation, stcc);
 }
@@ -756,7 +757,6 @@ static void
 transmit_address_to_client (void *cls, const char *buf)
 {
   struct AddressToStringContext *actx = cls;
-
   if (NULL == buf)
   {
     GNUNET_SERVER_transmit_context_append_data (actx->tc, NULL, 0,
@@ -1007,6 +1007,8 @@ GST_clients_start (struct GNUNET_SERVER_Handle *server)
     {&GST_blacklist_handle_reply, NULL,
      GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY,
      sizeof (struct BlacklistMessage)},
+    {&GST_manipulation_set_metric, NULL,
+     GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC, 0},
     {NULL, NULL, 0, 0}
   };
   nc = GNUNET_SERVER_notification_context_create (server, 0);