-fix
[oweals/gnunet.git] / src / namestore / gnunet-service-namestore.c
index f260d1db0473ef659422bb2b8bebbec874cdb0f3..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
   {
@@ -1610,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;