-handle failure to load certs more nicely
[oweals/gnunet.git] / src / gns / gnunet-service-gns.c
index a9bd46098b064d5acd51c3e6765f2d767eb3c649..b7eb1f80993bf90026c197c0ff2f93ae0d50d19a 100644 (file)
@@ -19,7 +19,7 @@
 */
 /**
  * @file gns/gnunet-service-gns.c
- * @brief GNUnet GNS service
+ * @brief GNU Name System (main service)
  * @author Martin Schanzenbach
  * @author Christian Grothoff
  */
@@ -286,6 +286,7 @@ dht_put_continuation (void *cls,
 {
   struct GNUNET_TIME_Relative next_put_interval; 
 
+  active_put = NULL;
   num_public_records++;  
   if ( (num_public_records > last_num_public_records) &&
        (GNUNET_NO == first_zone_iteration) )
@@ -418,7 +419,7 @@ put_gns_record (void *cls,
                                         rd_public_count);
   block_size = ntohl (block->purpose.size) 
     + sizeof (struct GNUNET_CRYPTO_EccSignature) 
-    + sizeof (struct GNUNET_CRYPTO_EccPublicKey);
+    + sizeof (struct GNUNET_CRYPTO_EccPublicSignKey);
   GNUNET_NAMESTORE_query_from_private_key (key,
                                           name,
                                           &query);
@@ -472,7 +473,7 @@ publish_zone_dht_start (void *cls,
  * Reply to client with the result from our lookup.
  *
  * @param cls the closure (our client lookup handle)
- * @param rd_count the number of records
+ * @param rd_count the number of records in @a rd
  * @param rd the record data
  */
 static void
@@ -505,6 +506,7 @@ send_lookup_response (void* cls,
   GNUNET_SERVER_receive_done (clh->client, 
                              GNUNET_OK); 
   GNUNET_CONTAINER_DLL_remove (clh_head, clh_tail, clh);
+  GNUNET_SERVER_client_set_user_context (clh->client, NULL);
   GNUNET_free (clh);
   GNUNET_STATISTICS_update (statistics,
                             "Completed lookups", 1, 
@@ -633,7 +635,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
     { &handle_lookup, NULL, GNUNET_MESSAGE_TYPE_GNS_LOOKUP, 0},
     {NULL, NULL, 0, 0}
   };
-  struct GNUNET_CRYPTO_EccPublicKey dns_root;
+  struct GNUNET_CRYPTO_EccPublicSignKey dns_root;
   unsigned long long max_parallel_bg_queries = 0;
   char *dns_root_name;
 
@@ -697,7 +699,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
                                             &dns_root_name))
   {
     if (GNUNET_OK !=
-       GNUNET_CRYPTO_ecc_public_key_from_string (dns_root_name,
+       GNUNET_CRYPTO_ecc_public_sign_key_from_string (dns_root_name,
                                                  strlen (dns_root_name),
                                                  &dns_root))
     {