eliminating dead HELLO logic, not needed for x-vine/whanau
authorChristian Grothoff <christian@grothoff.org>
Mon, 27 Apr 2015 12:53:35 +0000 (12:53 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 27 Apr 2015 12:53:35 +0000 (12:53 +0000)
src/dht/Makefile.am
src/dht/gnunet-service-wdht.c
src/dht/gnunet-service-wdht_clients.c
src/dht/gnunet-service-wdht_hello.c [deleted file]
src/dht/gnunet-service-wdht_hello.h [deleted file]
src/dht/gnunet-service-wdht_neighbours.h
src/dht/gnunet-service-xdht.c
src/dht/gnunet-service-xdht_neighbours.h

index 039cdb038d144202a723f2a7b04216f9e4b4ee56..2c820385f8663c233c6978b3af59d284391bb772 100644 (file)
@@ -82,7 +82,6 @@ gnunet_service_dht_xvine_SOURCES = \
  gnunet-service-xdht.c gnunet-service-xdht.h \
  gnunet-service-xdht_clients.c gnunet-service-xdht_clients.h \
  gnunet-service-xdht_datacache.c gnunet-service-xdht_datacache.h \
- gnunet-service-xdht_hello.c gnunet-service-xdht_hello.h \
  gnunet-service-xdht_nse.c gnunet-service-xdht_nse.h \
  gnunet-service-xdht_neighbours.c gnunet-service-xdht_neighbours.h \
  gnunet-service-xdht_routing.c gnunet-service-xdht_routing.h
@@ -103,7 +102,6 @@ gnunet_service_dht_whanau_SOURCES = \
  gnunet-service-wdht.c gnunet-service-wdht.h \
  gnunet-service-wdht_clients.c gnunet-service-wdht_clients.h \
  gnunet-service-wdht_datacache.c gnunet-service-wdht_datacache.h \
- gnunet-service-wdht_hello.c gnunet-service-wdht_hello.h \
  gnunet-service-wdht_nse.c gnunet-service-wdht_nse.h \
  gnunet-service-wdht_neighbours.c gnunet-service-wdht_neighbours.h \
  gnunet-service-wdht_routing.c gnunet-service-wdht_routing.h
index 13e60acf464a477b90a2773b2ec739ead1ee22f9..015381a55de1580d1f2dc2cbb45c99e5e467cf64 100644 (file)
@@ -57,55 +57,6 @@ struct GNUNET_BLOCK_Context *GDS_block_context;
  */
 const struct GNUNET_CONFIGURATION_Handle *GDS_cfg;
 
-/**
- * Our HELLO
- */
-struct GNUNET_MessageHeader *GDS_my_hello;
-
-/**
- * Handle to the transport service, for getting our hello
- */
-struct GNUNET_TRANSPORT_Handle *GDS_transport_handle;
-
-/**
- * Handle to get our current HELLO.
- */
-static struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
-
-/**
- * Hello address expiration
- */
-struct GNUNET_TIME_Relative hello_expiration;
-
-/**
- * Should we store our topology predecessor and successor IDs into statistics?
- */
-extern unsigned int track_topology;
-
-#if ENABLE_MALICIOUS
-/**
- * Should this peer act malicious?
- */
-unsigned int malicious;
-#endif
-
-
-/**
- * Receive the HELLO from transport service, free current and replace
- * if necessary.
- *
- * @param cls NULL
- * @param message HELLO message of peer
- */
-static void
-process_hello (void *cls, const struct GNUNET_MessageHeader *message)
-{
-  GNUNET_assert (message != NULL);
-  GNUNET_free_non_null (GDS_my_hello);
-  GDS_my_hello = GNUNET_malloc (ntohs (message->size));
-  memcpy (GDS_my_hello, message, ntohs (message->size));
-}
-
 
 /**
  * Task run during shutdown.
@@ -116,21 +67,9 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
 static void
 shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  if (NULL != ghh)
-  {
-    GNUNET_TRANSPORT_get_hello_cancel (ghh);
-    ghh = NULL;
-  }
-  if (GDS_transport_handle != NULL)
-  {
-    GNUNET_TRANSPORT_disconnect (GDS_transport_handle);
-    GDS_transport_handle = NULL;
-  }
-
   GDS_NEIGHBOURS_done ();
   GDS_DATACACHE_done ();
   GDS_ROUTING_done ();
-  GDS_HELLO_done ();
   GDS_NSE_done ();
   if (GDS_block_context != NULL)
   {
@@ -142,8 +81,6 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_STATISTICS_destroy (GDS_stats, GNUNET_YES);
     GDS_stats = NULL;
   }
-  GNUNET_free_non_null (GDS_my_hello);
-  GDS_my_hello = NULL;
 }
 
 
@@ -159,41 +96,22 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
      const struct GNUNET_CONFIGURATION_Handle *c)
 {
   unsigned long long _track_topology;
+
   GDS_cfg = c;
-  if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_time (c, "transport", "HELLO_EXPIRATION", &hello_expiration))
-  {
-    hello_expiration = GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION;
-  }
   GDS_block_context = GNUNET_BLOCK_context_create (GDS_cfg);
   GDS_stats = GNUNET_STATISTICS_create ("dht", GDS_cfg);
   GDS_ROUTING_init ();
   GDS_NSE_init ();
   GDS_DATACACHE_init ();
-  GDS_HELLO_init ();
   GDS_CLIENTS_init (server);
-  if (GNUNET_OK ==
-      GNUNET_CONFIGURATION_get_value_number (c, "xdht", "track_toplogy",
-                                             &_track_topology))
-  {
-    track_topology = (unsigned int) _track_topology;
-  }
   if (GNUNET_OK != GDS_NEIGHBOURS_init ())
   {
     shutdown_task (NULL, NULL);
     return;
   }
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
+  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
+                                &shutdown_task,
                                 NULL);
-  GDS_transport_handle =
-      GNUNET_TRANSPORT_connect (GDS_cfg, NULL, NULL, NULL, NULL, NULL);
-  if (GDS_transport_handle == NULL)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                _("Failed to connect to transport service!\n"));
-    return;
-  }
-  ghh = GNUNET_TRANSPORT_get_hello (GDS_transport_handle, &process_hello, NULL);
 }
 
 
@@ -211,10 +129,11 @@ main (int argc, char *const *argv)
 
   ret =
       (GNUNET_OK ==
-       GNUNET_SERVICE_run (argc, argv, "dht", GNUNET_SERVICE_OPTION_NONE, &run,
+       GNUNET_SERVICE_run (argc, argv, "wdht",
+                           GNUNET_SERVICE_OPTION_NONE, &run,
                            NULL)) ? 0 : 1;
   GDS_CLIENTS_done ();
   return ret;
 }
 
-/* end of gnunet-service-dht.c */
+/* end of gnunet-service-wdht.c */
index 2e4d4ef0a0b4b26d68f99876b6f207d48087c96f..896920e98891e05bfbd25eaff03ce45c27612c29 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file dht/gnunet-service-dht_clients.c
+ * @file dht/gnunet-service-wdht_clients.c
  * @brief GNUnet DHT service's client management code
  * @author Christian Grothoff
  * @author Nathan Evans
@@ -473,8 +473,8 @@ remove_client_records (void *cls, const struct GNUNET_HashCode * key, void *valu
  * @param cls the 'struct ForwardReplyContext'
  * @param key current key
  * @param value value in the hash map, a ClientQueryRecord
- * @return GNUNET_YES (we should continue to iterate),
- *         if the result is mal-formed, GNUNET_NO
+ * @return #GNUNET_YES (we should continue to iterate),
+ *         if the result is mal-formed, #GNUNET_NO
  */
 static int
 forward_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
@@ -777,7 +777,7 @@ GDS_CLIENTS_process_put (uint32_t options,
                          unsigned int path_length,
                          const struct GNUNET_PeerIdentity *path,
                          struct GNUNET_TIME_Absolute exp,
-                         const struct GNUNET_HashCode * key,
+                         const struct GNUNET_HashCode *key,
                          const void *data,
                          size_t size)
 {
@@ -1161,7 +1161,7 @@ struct RemoveByUniqueIdContext
  * @param cls unique ID and client to search for in source routes
  * @param key current key code
  * @param value value in the hash map, a ClientQueryRecord
- * @return GNUNET_YES (we should continue to iterate)
+ * @return #GNUNET_YES (we should continue to iterate)
  */
 static int
 remove_by_unique_id (void *cls, const struct GNUNET_HashCode * key, void *value)
@@ -1289,47 +1289,10 @@ handle_dht_local_monitor_stop (void *cls, struct GNUNET_SERVER_Client *client,
     }
     r = r->next;
   }
-
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
 }
 
 
-#if ENABLE_MALICIOUS
-/**
- * Handler for act malicious message.
- *
- * @param cls closure for the service
- * @param client the client we received this message from
- * @param message the actual message received
- *
- */
-static void
-handle_dht_act_malicious (void *cls, struct GNUNET_SERVER_Client *client,
-                          const struct GNUNET_MessageHeader *message)
-{
-  const struct GNUNET_DHT_ActMaliciousMessage *msg;
-  struct PendingMessage *pm;
-  struct GNUNET_DHT_ClientActMaliciousConfirmationMessage *conf;
-  unsigned int malicious_action;
-
-  msg = (const struct GNUNET_DHT_ActMaliciousMessage *)message;
-  malicious_action = msg->action;
-
-  if(GNUNET_OK == GDS_NEIGHBOURS_act_malicious (malicious_action))
-  {
-    pm = GNUNET_malloc (sizeof (struct PendingMessage) +
-                     sizeof (struct GNUNET_DHT_ClientActMaliciousConfirmationMessage));
-    conf = (struct GNUNET_DHT_ClientActMaliciousConfirmationMessage *) &pm[1];
-    conf->header.size = htons (sizeof (struct GNUNET_DHT_ClientActMaliciousConfirmationMessage));
-    conf->header.type = htons (GNUNET_MESSAGE_TYPE_DHT_CLIENT_ACT_MALICIOUS_OK);
-    pm->msg = &conf->header;
-    add_pending_message (find_active_client (client), pm);
-    GNUNET_SERVER_receive_done (client, GNUNET_OK);
-  }
-}
-#endif
-
-
 /**
  * Functions with this signature are called whenever a client
  * is disconnected on the network level.
@@ -1405,11 +1368,6 @@ GDS_CLIENTS_init (struct GNUNET_SERVER_Handle *server)
      sizeof (struct GNUNET_DHT_MonitorStartStopMessage)},
     {&handle_dht_local_get_result_seen, NULL,
      GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_RESULTS_KNOWN, 0},
-    #if ENABLE_MALICIOUS
-    {&handle_dht_act_malicious, NULL,
-     GNUNET_MESSAGE_TYPE_DHT_ACT_MALICIOUS,
-     sizeof (struct GNUNET_DHT_ActMaliciousMessage)},
-    #endif
     {NULL, NULL, 0, 0}
   };
   forward_map = GNUNET_CONTAINER_multihashmap_create (1024, GNUNET_NO);
@@ -1446,4 +1404,4 @@ GDS_CLIENTS_done ()
   }
 }
 
-/* end of gnunet-service-dht_clients.c */
+/* end of gnunet-service-wdht_clients.c */
diff --git a/src/dht/gnunet-service-wdht_hello.c b/src/dht/gnunet-service-wdht_hello.c
deleted file mode 100644 (file)
index c5e6c79..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-     This file is part of GNUnet.
-     Copyright (C) 2011 Christian Grothoff (and other contributing authors)
-
-     GNUnet is free software; you can redistribute it and/or modify
-     it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 3, or (at your
-     option) any later version.
-
-     GNUnet is distributed in the hope that it will be useful, but
-     WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     General Public License for more details.
-
-     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.
-*/
-
-/**
- * @file dht/gnunet-service-xdht_hello.c
- * @brief GNUnet DHT integration with peerinfo
- * @author Christian Grothoff
- *
- * TODO:
- * - consider adding mechanism to remove expired HELLOs
- */
-#include "platform.h"
-#include "gnunet-service-wdht.h"
-#include "gnunet-service-wdht_hello.h"
-#include "gnunet_peerinfo_service.h"
-
-
-/**
- * Handle for peerinfo notifications.
- */
-static struct GNUNET_PEERINFO_NotifyContext *pnc;
-
-/**
- * Hash map of peers to HELLOs.
- */
-static struct GNUNET_CONTAINER_MultiPeerMap *peer_to_hello;
-
-
-/**
- * Obtain a peer's HELLO if available
- *
- * @param peer peer to look for a HELLO from
- * @return HELLO for the given peer
- */
-const struct GNUNET_HELLO_Message *
-GDS_HELLO_get (const struct GNUNET_PeerIdentity *peer)
-{
-  if (NULL == peer_to_hello)
-    return NULL;
-  return GNUNET_CONTAINER_multipeermap_get (peer_to_hello, peer);
-}
-
-
-/**
- * Function called for each HELLO known to PEERINFO.
- *
- * @param cls closure
- * @param peer id of the peer, NULL for last call
- * @param hello hello message for the peer (can be NULL)
- * @param err_msg error message (not used)
- */
-static void
-process_hello (void *cls, const struct GNUNET_PeerIdentity *peer,
-               const struct GNUNET_HELLO_Message *hello, const char *err_msg)
-{
-  struct GNUNET_TIME_Absolute ex;
-  struct GNUNET_HELLO_Message *hm;
-
-  if (hello == NULL)
-    return;
-  ex = GNUNET_HELLO_get_last_expiration (hello);
-  if (0 == GNUNET_TIME_absolute_get_remaining (ex).rel_value_us)
-    return;
-  GNUNET_STATISTICS_update (GDS_stats,
-                            gettext_noop ("# HELLOs obtained from peerinfo"), 1,
-                            GNUNET_NO);
-  hm = GNUNET_CONTAINER_multipeermap_get (peer_to_hello, peer);
-  GNUNET_free_non_null (hm);
-  hm = GNUNET_malloc (GNUNET_HELLO_size (hello));
-  memcpy (hm, hello, GNUNET_HELLO_size (hello));
-  GNUNET_assert (GNUNET_SYSERR !=
-                 GNUNET_CONTAINER_multipeermap_put (peer_to_hello,
-                                                    peer, hm,
-                                                    GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE));
-}
-
-
-/**
- * Initialize HELLO subsystem.
- */
-void
-GDS_HELLO_init ()
-{
-  pnc = GNUNET_PEERINFO_notify (GDS_cfg, GNUNET_NO, &process_hello, NULL);
-  peer_to_hello = GNUNET_CONTAINER_multipeermap_create (256, GNUNET_NO);
-}
-
-
-/**
- * Free memory occopied by the HELLO.
- */
-static int
-free_hello (void *cls,
-           const struct GNUNET_PeerIdentity *key,
-           void *hello)
-{
-  GNUNET_free (hello);
-  return GNUNET_OK;
-}
-
-
-/**
- * Shutdown HELLO subsystem.
- */
-void
-GDS_HELLO_done ()
-{
-  if (NULL != pnc)
-  {
-    GNUNET_PEERINFO_notify_cancel (pnc);
-    pnc = NULL;
-  }
-  if (NULL != peer_to_hello)
-  {
-    GNUNET_CONTAINER_multipeermap_iterate (peer_to_hello, &free_hello, NULL);
-    GNUNET_CONTAINER_multipeermap_destroy (peer_to_hello);
-  }
-}
-
-/* end of gnunet-service-dht_hello.c */
diff --git a/src/dht/gnunet-service-wdht_hello.h b/src/dht/gnunet-service-wdht_hello.h
deleted file mode 100644 (file)
index e7376e7..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-     This file is part of GNUnet.
-     Copyright (C) 2011 Christian Grothoff (and other contributing authors)
-
-     GNUnet is free software; you can redistribute it and/or modify
-     it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 3, or (at your
-     option) any later version.
-
-     GNUnet is distributed in the hope that it will be useful, but
-     WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     General Public License for more details.
-
-     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.
-*/
-
-/**
- * @file dht/gnunet-service-xdht_hello.h
- * @brief GNUnet DHT integration with peerinfo
- * @author Christian Grothoff
- */
-#ifndef GNUNET_SERVICE_XDHT_HELLO_H
-#define GNUNET_SERVICE_XDHT_HELLO_H
-
-#include "gnunet_util_lib.h"
-#include "gnunet_hello_lib.h"
-
-/**
- * Obtain a peer's HELLO if available
- *
- * @param peer peer to look for a HELLO from
- * @return HELLO for the given peer
- */
-const struct GNUNET_HELLO_Message *
-GDS_HELLO_get (const struct GNUNET_PeerIdentity *peer);
-
-
-/**
- * Initialize HELLO subsystem.
- */
-void
-GDS_HELLO_init (void);
-
-
-/**
- * Shutdown HELLO subsystem.
- */
-void
-GDS_HELLO_done (void);
-
-#endif
index edb241a6ca04a9bc6f3296eec864f4d1bae57037..87acc3908f9d781c6ca75a5240e8be0a11df3896 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2009, 2010, 2011, 2015 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
 */
 
 /**
- * @file dht/gnunet-service-xdht_neighbours.h
+ * @file dht/gnunet-service-wdht_neighbours.h
  * @brief GNUnet DHT routing code
  * @author Supriti Singh
  */
 
-#ifndef GNUNET_SERVICE_XDHT_NEIGHBOURS_H
-#define GNUNET_SERVICE_XDHT_NEIGHBOURS_H
+#ifndef GNUNET_SERVICE_WDHT_NEIGHBOURS_H
+#define GNUNET_SERVICE_WDHT_NEIGHBOURS_H
 
 #include "gnunet_util_lib.h"
 #include "gnunet_block_lib.h"
 #include "gnunet_dht_service.h"
 
 
-#if ENABLE_MALICIOUS
-/**
- * Set the ENABLE_MALICIOUS value to malicious.
- * @param malicious
- */
-int
-GDS_NEIGHBOURS_act_malicious (unsigned int malicious);
-#endif
-
 /**
  * Handle the put request from the client.
  * @param key Key for the content
@@ -69,10 +60,11 @@ GDS_NEIGHBOURS_handle_put (const struct GNUNET_HashCode *key,
  * @param desired_replication_level Desired replication count
  */
 void
-GDS_NEIGHBOURS_handle_get(const struct GNUNET_HashCode *key,
-                          enum GNUNET_BLOCK_Type block_type,
-                          enum GNUNET_DHT_RouteOption options,
-                          uint32_t desired_replication_level);
+GDS_NEIGHBOURS_handle_get (const struct GNUNET_HashCode *key,
+                           enum GNUNET_BLOCK_Type block_type,
+                           enum GNUNET_DHT_RouteOption options,
+                           uint32_t desired_replication_level);
+
 
 /**
  * Send the get result to requesting client.
@@ -100,24 +92,7 @@ GDS_NEIGHBOURS_send_get_result (const struct GNUNET_HashCode *key,
                                 struct GNUNET_TIME_Absolute expiration,
                                 const void *data, size_t data_size);
 
-/**
- * Construct a trail teardown message and forward it to target friend.
- * @param trail_id Unique identifier of the trail.
- * @param trail_direction Direction of trail.
- * @param target_friend Friend to get this message.
- */
-void
-GDS_NEIGHBOURS_send_trail_teardown (const struct GNUNET_HashCode *trail_id,
-                                    unsigned int trail_direction,
-                                    const struct GNUNET_PeerIdentity *peer);
 
-/**
- * Return friend corresponding to peer.
- * @param peer
- * @return  Friend
- */
-struct FriendInfo *
-GDS_NEIGHBOURS_get_friend (struct GNUNET_PeerIdentity peer);
 /**
  * Initialize neighbours subsystem.
  *
index f5ad28001f89a887565fd2d753dfc7f1fb958039..b946dc04829824a46345022715e9f0e6f4472a04 100644 (file)
@@ -57,26 +57,6 @@ struct GNUNET_BLOCK_Context *GDS_block_context;
  */
 const struct GNUNET_CONFIGURATION_Handle *GDS_cfg;
 
-/**
- * Our HELLO
- */
-struct GNUNET_MessageHeader *GDS_my_hello;
-
-/**
- * Handle to the transport service, for getting our hello
- */
-struct GNUNET_TRANSPORT_Handle *GDS_transport_handle;
-
-/**
- * Handle to get our current HELLO.
- */
-static struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
-
-/**
- * Hello address expiration
- */
-struct GNUNET_TIME_Relative hello_expiration;
-
 /**
  * Should we store our topology predecessor and successor IDs into statistics?
  */
@@ -90,23 +70,6 @@ unsigned int malicious;
 #endif
 
 
-/**
- * Receive the HELLO from transport service, free current and replace
- * if necessary.
- *
- * @param cls NULL
- * @param message HELLO message of peer
- */
-static void
-process_hello (void *cls, const struct GNUNET_MessageHeader *message)
-{
-  GNUNET_assert (message != NULL);
-  GNUNET_free_non_null (GDS_my_hello);
-  GDS_my_hello = GNUNET_malloc (ntohs (message->size));
-  memcpy (GDS_my_hello, message, ntohs (message->size));
-}
-
-
 /**
  * Task run during shutdown.
  *
@@ -116,21 +79,9 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
 static void
 shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  if (NULL != ghh)
-  {
-    GNUNET_TRANSPORT_get_hello_cancel (ghh);
-    ghh = NULL;
-  }
-  if (GDS_transport_handle != NULL)
-  {
-    GNUNET_TRANSPORT_disconnect (GDS_transport_handle);
-    GDS_transport_handle = NULL;
-  }
-
   GDS_NEIGHBOURS_done ();
   GDS_DATACACHE_done ();
   GDS_ROUTING_done ();
-  GDS_HELLO_done ();
   GDS_NSE_done ();
   if (GDS_block_context != NULL)
   {
@@ -142,8 +93,6 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_STATISTICS_destroy (GDS_stats, GNUNET_YES);
     GDS_stats = NULL;
   }
-  GNUNET_free_non_null (GDS_my_hello);
-  GDS_my_hello = NULL;
 }
 
 
@@ -159,18 +108,13 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
      const struct GNUNET_CONFIGURATION_Handle *c)
 {
   unsigned long long _track_topology;
+
   GDS_cfg = c;
-  if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_time (c, "transport", "HELLO_EXPIRATION", &hello_expiration))
-  {
-    hello_expiration = GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION;
-  }
   GDS_block_context = GNUNET_BLOCK_context_create (GDS_cfg);
   GDS_stats = GNUNET_STATISTICS_create ("dht", GDS_cfg);
   GDS_ROUTING_init ();
-  GDS_NSE_init (); 
+  GDS_NSE_init ();
   GDS_DATACACHE_init ();
-  GDS_HELLO_init ();
   GDS_CLIENTS_init (server);
   if (GNUNET_OK ==
       GNUNET_CONFIGURATION_get_value_number (c, "xdht", "track_toplogy",
@@ -183,17 +127,9 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
     shutdown_task (NULL, NULL);
     return;
   }
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
+  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
+                                &shutdown_task,
                                 NULL);
-  GDS_transport_handle =
-      GNUNET_TRANSPORT_connect (GDS_cfg, NULL, NULL, NULL, NULL, NULL);
-  if (GDS_transport_handle == NULL)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                _("Failed to connect to transport service!\n"));
-    return;
-  }
-  ghh = GNUNET_TRANSPORT_get_hello (GDS_transport_handle, &process_hello, NULL);
 }
 
 
@@ -211,10 +147,12 @@ main (int argc, char *const *argv)
 
   ret =
       (GNUNET_OK ==
-       GNUNET_SERVICE_run (argc, argv, "dht", GNUNET_SERVICE_OPTION_NONE, &run,
+       GNUNET_SERVICE_run (argc, argv,
+                           "xdht",
+                           GNUNET_SERVICE_OPTION_NONE, &run,
                            NULL)) ? 0 : 1;
   GDS_CLIENTS_done ();
   return ret;
 }
 
-/* end of gnunet-service-dht.c */
+/* end of gnunet-service-xdht.c */
index edb241a6ca04a9bc6f3296eec864f4d1bae57037..a46210139b2b51b38f7bb0744a667c10b542095b 100644 (file)
@@ -111,13 +111,7 @@ GDS_NEIGHBOURS_send_trail_teardown (const struct GNUNET_HashCode *trail_id,
                                     unsigned int trail_direction,
                                     const struct GNUNET_PeerIdentity *peer);
 
-/**
- * Return friend corresponding to peer.
- * @param peer
- * @return  Friend
- */
-struct FriendInfo *
-GDS_NEIGHBOURS_get_friend (struct GNUNET_PeerIdentity peer);
+
 /**
  * Initialize neighbours subsystem.
  *