someone changed how services start and didn't tell the dht testcase
authorNathan S. Evans <evans@in.tum.de>
Wed, 23 Jun 2010 15:51:43 +0000 (15:51 +0000)
committerNathan S. Evans <evans@in.tum.de>
Wed, 23 Jun 2010 15:51:43 +0000 (15:51 +0000)
src/dht/dht_api.c
src/dht/test_dht_api.c
src/dht/test_dht_api_peer1.conf

index c188e171fbc0a63ddab3a0c66d7e10d5d56a0e87..2d54eeb9ca8fd043c71c0e281bfc425c6f6cfa78 100644 (file)
@@ -315,6 +315,7 @@ static int retransmit_iterator (void *cls,
   pending_message_list->message->unique_id = route_handle->uid;
   /* Add the new pending message to the front of the retransmission list */
   pending_message_list->next = route_handle->dht_handle->retransmissions;
+  route_handle->dht_handle->retransmissions = pending_message_list;
 
   return GNUNET_OK;
 }
@@ -569,10 +570,12 @@ service_message_handler (void *cls,
                                              "dht", 
                                              handle->cfg);
 
-      handle->retransmit_stage = DHT_RETRANSMITTING;
-      GNUNET_CONTAINER_multihashmap_iterate(handle->outstanding_requests, &retransmit_iterator, handle);
-      handle->current = handle->retransmissions->message;
-      process_pending_retransmissions(handle);
+      if (GNUNET_CONTAINER_multihashmap_iterate(handle->outstanding_requests, &retransmit_iterator, handle) > 0)
+        {
+          handle->retransmit_stage = DHT_RETRANSMITTING;
+          handle->current = handle->retransmissions->message;
+          process_pending_retransmissions(handle);
+        }
       return;
     }
 
index 122dfff16db3f03b54dd94cd40e2a6774b8f82e9..635001c941ddedace601d512217d3d440c8021fd 100644 (file)
@@ -149,7 +149,8 @@ end_badly ()
 #if VERBOSE
   fprintf (stderr, "Ending on an unhappy note.\n");
 #endif
-  if (retry_context.peer_ctx->find_peer_handle != NULL)
+
+  if ((retry_context.peer_ctx != NULL) && (retry_context.peer_ctx->find_peer_handle != NULL))
     GNUNET_DHT_find_peer_stop(retry_context.peer_ctx->find_peer_handle, NULL, NULL);
   if (retry_context.retry_task != GNUNET_SCHEDULER_NO_TASK)
     GNUNET_SCHEDULER_cancel(sched, retry_context.retry_task);
index 33ca838f3e3082285d86e91d80dac570ddfe6546..c02567efd2ae85c8423929bee7e9be2881e46e7d 100644 (file)
@@ -8,23 +8,9 @@ HOSTNAME = localhost
 PORT = 2094
 INDEXDB = $SERVICEHOME/idxinfo.lst
 
-[datastore-sqlite]
-FILENAME = $SERVICEHOME/datastore/sqlite.db
-
-[datastore]
-DATABASE = sqlite
-BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
-QUOTA = 100000000
-ACCEPT_FROM6 = ::1;
-ACCEPT_FROM = 127.0.0.1;
-BINARY = gnunet-service-datastore
-CONFIG = $DEFAULTCONFIG
-HOME = $SERVICEHOME
-HOSTNAME = localhost
-PORT = 2093
-
 [dht]
 DEBUG = NO
+AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 BINARY = gnunet-service-dht
@@ -40,25 +26,6 @@ PORT = 2100
 QUOTA = 1000000
 DATABASE = sqlite
 
-[hostlist]
-HTTP-PROXY = 
-SERVERS = http://gnunet.org:8080/
-OPTIONS = -b
-BINARY = gnunet-daemon-hostlist
-CONFIG = $DEFAULTCONFIG
-HOME = $SERVICEHOME
-HOSTNAME = localhost
-HTTPPORT = 8080
-
-[topology]
-BINARY = gnunet-daemon-topology
-CONFIG = $DEFAULTCONFIG
-FRIENDS = $SERVICEHOME/friends
-TARGET-CONNECTION-COUNT = 16
-AUTOCONNECT = YES
-FRIENDS-ONLY = NO
-MINIMUM-FRIENDS = 0
-
 [transport]
 PLUGINS = tcp
 DEBUG = NO
@@ -73,35 +40,6 @@ HOME = $SERVICEHOME
 HOSTNAME = localhost
 PORT = 12365
 
-[peerinfo]
-TRUST = $SERVICEHOME/data/credit/
-HOSTS = $SERVICEHOME/data/hosts/
-ACCEPT_FROM6 = ::1;
-ACCEPT_FROM = 127.0.0.1;
-BINARY = gnunet-service-peerinfo
-CONFIG = $DEFAULTCONFIG
-HOME = $SERVICEHOME
-HOSTNAME = localhost
-PORT = 12369
-
-[resolver]
-ACCEPT_FROM6 = ::1;
-ACCEPT_FROM = 127.0.0.1;
-BINARY = gnunet-service-resolver
-CONFIG = $DEFAULTCONFIG
-HOME = $SERVICEHOME
-HOSTNAME = localhost
-PORT = 12364
-
-[statistics]
-ACCEPT_FROM6 = ::1;
-ACCEPT_FROM = 127.0.0.1;
-BINARY = gnunet-service-statistics
-CONFIG = $DEFAULTCONFIG
-HOME = $SERVICEHOME
-HOSTNAME = localhost
-PORT = 12367
-
 [core]
 TOTAL_QUOTA_OUT = 3932160
 TOTAL_QUOTA_IN = 3932160
@@ -122,6 +60,7 @@ CONFIG = $DEFAULTCONFIG
 HOME = $SERVICEHOME
 HOSTNAME = localhost
 PORT = 12366
+DEBUG = YES
 
 [transport-tcp]
 TIMEOUT = 300000