-fix
[oweals/gnunet.git] / src / namestore / gnunet-service-namestore.c
index 57d2dd0072a17b71cfe6cf1239deca361f755459..dc81ccea39dd68a60ed57e48a557fc269cef319f 100644 (file)
@@ -198,7 +198,7 @@ int zone_to_disk_it (void *cls,
     write_key_to_file(c->filename, c);
   else
   {
-    GNUNET_asprintf(&c->filename, "%s/%s.zone", zonefile_directory, GNUNET_h2s_full (&c->zone));
+    GNUNET_asprintf(&c->filename, "%s/%s.zkey", zonefile_directory, GNUNET_h2s_full (&c->zone));
     write_key_to_file(c->filename, c);
   }
 
@@ -1239,7 +1239,7 @@ handle_zone_to_name_it (void *cls,
     /* found result */
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found results: name is `%s', has %u records\n", name, rd_count);
     res = GNUNET_YES;
-    name_len = strlen (name);
+    name_len = strlen (name) +1;
   }
   else
   {
@@ -1485,7 +1485,6 @@ static void handle_iteration_start (void *cls,
   struct ZoneIterationStartMessage * zis_msg = (struct ZoneIterationStartMessage *) message;
   struct GNUNET_NAMESTORE_Client *nc;
   struct GNUNET_NAMESTORE_ZoneIteration *zi;
-  int res;
 
   nc = client_lookup(client);
   if (nc == NULL)
@@ -1519,7 +1518,7 @@ static void handle_iteration_start (void *cls,
 
   GNUNET_CONTAINER_DLL_insert (nc->op_head, nc->op_tail, zi);
 
-  res = GSN_database->iterate_records (GSN_database->cls, zone_tmp , NULL, zi->offset , &zone_iteration_proc, zi);
+  GSN_database->iterate_records (GSN_database->cls, zone_tmp , NULL, zi->offset , &zone_iteration_proc, zi);
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
 }
 
@@ -1611,7 +1610,7 @@ static void handle_iteration_next (void *cls,
 int zonekey_file_it (void *cls, const char *filename)
 {
   int *counter = cls;
-   if ((filename != NULL) && (NULL != strstr(filename, ".zone")))
+   if ((filename != NULL) && (NULL != strstr(filename, ".zkey")))
    {
      struct GNUNET_CRYPTO_RsaPrivateKey * privkey;
      struct GNUNET_NAMESTORE_CryptoContainer *c;