gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r35561 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r35561 - gnunet/src/dht
Date: Mon, 27 Apr 2015 14:53:35 +0200

Author: grothoff
Date: 2015-04-27 14:53:35 +0200 (Mon, 27 Apr 2015)
New Revision: 35561

Removed:
   gnunet/src/dht/gnunet-service-wdht_hello.c
   gnunet/src/dht/gnunet-service-wdht_hello.h
Modified:
   gnunet/src/dht/Makefile.am
   gnunet/src/dht/gnunet-service-wdht.c
   gnunet/src/dht/gnunet-service-wdht_clients.c
   gnunet/src/dht/gnunet-service-wdht_neighbours.h
   gnunet/src/dht/gnunet-service-xdht.c
   gnunet/src/dht/gnunet-service-xdht_neighbours.h
Log:
eliminating dead HELLO logic, not needed for x-vine/whanau

Modified: gnunet/src/dht/Makefile.am
===================================================================
--- gnunet/src/dht/Makefile.am  2015-04-27 12:00:16 UTC (rev 35560)
+++ gnunet/src/dht/Makefile.am  2015-04-27 12:53:35 UTC (rev 35561)
@@ -82,7 +82,6 @@
  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-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

Modified: gnunet/src/dht/gnunet-service-wdht.c
===================================================================
--- gnunet/src/dht/gnunet-service-wdht.c        2015-04-27 12:00:16 UTC (rev 
35560)
+++ gnunet/src/dht/gnunet-service-wdht.c        2015-04-27 12:53:35 UTC (rev 
35561)
@@ -57,57 +57,8 @@
  */
 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.
  *
  * @param cls unused
@@ -116,21 +67,9 @@
 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 @@
     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 @@
      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 @@
 
   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 */

Modified: gnunet/src/dht/gnunet-service-wdht_clients.c
===================================================================
--- gnunet/src/dht/gnunet-service-wdht_clients.c        2015-04-27 12:00:16 UTC 
(rev 35560)
+++ gnunet/src/dht/gnunet-service-wdht_clients.c        2015-04-27 12:53:35 UTC 
(rev 35561)
@@ -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 @@
  * @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 @@
                          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 @@
  * @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,48 +1289,11 @@
     }
     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 @@
      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 @@
   }
 }
 
-/* end of gnunet-service-dht_clients.c */
+/* end of gnunet-service-wdht_clients.c */

Deleted: gnunet/src/dht/gnunet-service-wdht_hello.c
===================================================================
--- gnunet/src/dht/gnunet-service-wdht_hello.c  2015-04-27 12:00:16 UTC (rev 
35560)
+++ gnunet/src/dht/gnunet-service-wdht_hello.c  2015-04-27 12:53:35 UTC (rev 
35561)
@@ -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 */

Deleted: gnunet/src/dht/gnunet-service-wdht_hello.h
===================================================================
--- gnunet/src/dht/gnunet-service-wdht_hello.h  2015-04-27 12:00:16 UTC (rev 
35560)
+++ gnunet/src/dht/gnunet-service-wdht_hello.h  2015-04-27 12:53:35 UTC (rev 
35561)
@@ -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

Modified: gnunet/src/dht/gnunet-service-wdht_neighbours.h
===================================================================
--- gnunet/src/dht/gnunet-service-wdht_neighbours.h     2015-04-27 12:00:16 UTC 
(rev 35560)
+++ gnunet/src/dht/gnunet-service-wdht_neighbours.h     2015-04-27 12:53:35 UTC 
(rev 35561)
@@ -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
@@ -19,29 +19,20 @@
 */
 
 /**
- * @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
  * @param block_type Type of the block
@@ -69,11 +60,12 @@
  * @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.
  * @param key Key of the requested data.
@@ -100,25 +92,8 @@
                                 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.
  *
  * @return #GNUNET_OK on success,

Modified: gnunet/src/dht/gnunet-service-xdht.c
===================================================================
--- gnunet/src/dht/gnunet-service-xdht.c        2015-04-27 12:00:16 UTC (rev 
35560)
+++ gnunet/src/dht/gnunet-service-xdht.c        2015-04-27 12:53:35 UTC (rev 
35561)
@@ -58,26 +58,6 @@
 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;
@@ -91,23 +71,6 @@
 
 
 /**
- * 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.
  *
  * @param cls unused
@@ -116,21 +79,9 @@
 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 @@
     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 @@
      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 @@
     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 @@
 
   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 */

Modified: gnunet/src/dht/gnunet-service-xdht_neighbours.h
===================================================================
--- gnunet/src/dht/gnunet-service-xdht_neighbours.h     2015-04-27 12:00:16 UTC 
(rev 35560)
+++ gnunet/src/dht/gnunet-service-xdht_neighbours.h     2015-04-27 12:53:35 UTC 
(rev 35561)
@@ -111,14 +111,8 @@
                                     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.
  *
  * @return #GNUNET_OK on success,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]