fix
[oweals/gnunet.git] / src / gns / test_gns_simple_get_authority.c
index 307e2cf7817cd7f1f45e64e3d665fb0a02a4b675..6a8184efdba12a977a182b41f977616f986d1fbb 100644 (file)
@@ -99,6 +99,10 @@ process_auth_result(void* cls, const char* aname)
 {
   GNUNET_GNS_disconnect(gns_handle);
 
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "disconnecting from namestore\n");
+  GNUNET_NAMESTORE_disconnect (namestore_handle);
   ok = 0;
 
   if (aname == NULL)
@@ -136,10 +140,6 @@ commence_testing (void *cls, int32_t success, const char *emsg)
 {
   
   
-
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "disconnecting from namestore\n");
-  GNUNET_NAMESTORE_disconnect(namestore_handle, GNUNET_YES);
   
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "connecting to gns\n");
@@ -244,7 +244,7 @@ do_shorten(void *cls, const struct GNUNET_PeerIdentity *id,
   rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
   rd.data = &bob_hash;
   rd.record_type = GNUNET_GNS_RECORD_PKEY;
-  rd.flags = 0;
+  rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY;
   
   /* put bob into our zone */
   GNUNET_NAMESTORE_record_create (namestore_handle,
@@ -307,7 +307,9 @@ do_shorten(void *cls, const struct GNUNET_PeerIdentity *id,
                                NULL);
 
   GNUNET_free(sig);
-
+  GNUNET_CRYPTO_rsa_key_free (alice_key);
+  GNUNET_CRYPTO_rsa_key_free (bob_key);
+  GNUNET_CRYPTO_rsa_key_free (our_key);
 }
 
 static void