gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r5898 - GNUnet/src/applications/dht/module


From: gnunet
Subject: [GNUnet-SVN] r5898 - GNUnet/src/applications/dht/module
Date: Thu, 13 Dec 2007 23:04:28 -0700 (MST)

Author: grothoff
Date: 2007-12-13 23:04:28 -0700 (Thu, 13 Dec 2007)
New Revision: 5898

Modified:
   GNUnet/src/applications/dht/module/cs.c
   GNUnet/src/applications/dht/module/routing.c
   GNUnet/src/applications/dht/module/routing.h
   GNUnet/src/applications/dht/module/service.c
Log:
stupid code be gone

Modified: GNUnet/src/applications/dht/module/cs.c
===================================================================
--- GNUnet/src/applications/dht/module/cs.c     2007-12-14 06:01:07 UTC (rev 
5897)
+++ GNUnet/src/applications/dht/module/cs.c     2007-12-14 06:04:28 UTC (rev 
5898)
@@ -45,7 +45,7 @@
  */
 static GNUNET_DHT_ServiceAPI *dhtAPI;
 
-typedef struct DHT_CLIENT_GET_RECORD
+struct DHT_CLIENT_GET_RECORD
 {
 
   struct DHT_CLIENT_GET_RECORD * next;
@@ -150,10 +150,7 @@
   struct DHT_CLIENT_GET_RECORD *record = cls;
   struct DHT_CLIENT_GET_RECORD * pos;
   struct DHT_CLIENT_GET_RECORD * prev;
-  int i;
-  int found;
 
-  found = GNUNET_NO;
   GNUNET_mutex_lock (lock);
   pos = getRecords;
   prev = NULL;
@@ -306,8 +303,8 @@
       coreAPI->GNUNET_CORE_cs_exit_handler_unregister (&csClientExit))
     status = GNUNET_SYSERR;
 
-  while (getRecordsSize > 0)
-    get_timeout (getRecords[0]);
+  while (getRecords != NULL)
+    get_timeout (getRecords);
   coreAPI->GNUNET_CORE_release_service (dhtAPI);
   dhtAPI = NULL;
   coreAPI = NULL;

Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c        2007-12-14 06:01:07 UTC 
(rev 5897)
+++ GNUnet/src/applications/dht/module/routing.c        2007-12-14 06:04:28 UTC 
(rev 5898)
@@ -34,7 +34,6 @@
 #include "platform.h"
 #include "routing.h"
 #include "table.h"
-#include "dstore.h"
 #include "gnunet_protocols.h"
 #include "gnunet_core.h"
 #include "gnunet_stats_service.h"
@@ -615,8 +614,8 @@
                      &put[1], CONTENT_LIFETIME + now,
                      CONTENT_LIFETIME);
 #endif
-      dstore->put (ntohl (put->type),
-                  &put->key,
+      dstore->put (&put->key,
+                  ntohl (put->type),
                   CONTENT_LIFETIME + now,
                   ntohs (put->header.size) - sizeof (DHT_MESSAGE),
                   (const char *) &put[1]);

Modified: GNUnet/src/applications/dht/module/routing.h
===================================================================
--- GNUnet/src/applications/dht/module/routing.h        2007-12-14 06:01:07 UTC 
(rev 5897)
+++ GNUnet/src/applications/dht/module/routing.h        2007-12-14 06:04:28 UTC 
(rev 5898)
@@ -29,9 +29,8 @@
 
 #include "gnunet_util.h"
 #include "gnunet_core.h"
-#include "dstore.h"
+#include "gnunet_dstore_service.h"
 
-
 /**
  * Start a DHT get operation.
  */

Modified: GNUnet/src/applications/dht/module/service.c
===================================================================
--- GNUnet/src/applications/dht/module/service.c        2007-12-14 06:01:07 UTC 
(rev 5897)
+++ GNUnet/src/applications/dht/module/service.c        2007-12-14 06:04:28 UTC 
(rev 5898)
@@ -25,7 +25,6 @@
  */
 
 #include "platform.h"
-#include "dstore.h"
 #include "table.h"
 #include "routing.h"
 #include "gnunet_dht_service.h"
@@ -171,22 +170,15 @@
 
   cron = GNUNET_cron_create (capi->ectx);
   GNUNET_cron_start (cron);
-  if (GNUNET_OK != init_dht_store (1024 * 1024, capi))
-    {
-      GNUNET_GE_BREAK (capi->ectx, 0);
-      return NULL;
-    }
   if (GNUNET_OK != init_dht_table (capi))
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
-      done_dht_store ();
       return NULL;
     }
   if (GNUNET_OK != GNUNET_DHT_init_routing (capi))
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
       done_dht_table ();
-      done_dht_store ();
       return NULL;
     }
   coreAPI = capi;
@@ -205,7 +197,6 @@
   GNUNET_cron_stop (cron);
   GNUNET_DHT_done_routing ();
   done_dht_table ();
-  done_dht_store ();
   GNUNET_cron_destroy (cron);
   return GNUNET_OK;
 }





reply via email to

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