fix
[oweals/gnunet.git] / src / gns / test_gns_pseu_shorten.c
index f181f0cc7123f408c38e019bbe58f447c493cafa..f3a3c59a20154ac40d254e42da963840155c7c21 100644 (file)
@@ -158,7 +158,7 @@ process_shorten_result(void* cls, const char* sname)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   "shorten test failed! (wanted: %s got: %s\n",
-                  (char*)cls, sname);
+                  TEST_EXPECTED_RESULT, sname);
       ok = 1;
     }
 
@@ -173,9 +173,11 @@ static void
 do_shorten(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   GNUNET_GNS_shorten_zone (gns_handle, TEST_DOMAIN,
-                     &our_zone,
-                     &process_shorten_result,
-                     TEST_DOMAIN);
+                           &priv_zone,
+                           &short_zone,
+                           &our_zone,
+                           &process_shorten_result,
+                           TEST_DOMAIN);
 }
 
 static void
@@ -199,7 +201,7 @@ on_lookup_result(void *cls, uint32_t rd_count,
     for (i=0; i<rd_count; i++)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
-      if (rd[i].record_type == GNUNET_GNS_RECORD_TYPE_A)
+      if (rd[i].record_type == GNUNET_GNS_RECORD_A)
       {
         memcpy(&a, rd[i].data, sizeof(a));
         addr = inet_ntoa(a);
@@ -236,6 +238,7 @@ commence_testing (void *cls, int success)
   GNUNET_CRYPTO_rsa_key_free(bob_key);
   GNUNET_CRYPTO_rsa_key_free(alice_key);
 
+  GNUNET_NAMESTORE_disconnect (namestore_handle);
   gns_handle = GNUNET_GNS_connect(cfg);
 
   if (NULL == gns_handle)
@@ -246,7 +249,7 @@ commence_testing (void *cls, int success)
 
   GNUNET_GNS_lookup_zone (gns_handle, TEST_DOMAIN,
                           &our_zone,
-                          GNUNET_GNS_RECORD_TYPE_A,
+                          GNUNET_GNS_RECORD_A,
                           GNUNET_NO,
                           short_key,
                           &on_lookup_result, TEST_DOMAIN);
@@ -478,12 +481,6 @@ put_pkey_dht(void *cls, int32_t success, const char *emsg)
                                           &rd,
                                           1);
 
-  GNUNET_break (GNUNET_OK == GNUNET_NAMESTORE_verify_signature (&bob_pkey,
-                                                                 GNUNET_TIME_UNIT_FOREVER_ABS,
-                                                                 TEST_AUTHORITY_ALICE,
-                                                                 1,
-                                                                 &rd,
-                                                                 sig));
   rd_payload_length = GNUNET_NAMESTORE_records_get_size (1, &rd);
   nrb = GNUNET_malloc(rd_payload_length + strlen(TEST_AUTHORITY_ALICE) + 1
                       + sizeof(struct GNSNameRecordBlock));
@@ -533,7 +530,6 @@ put_pkey_dht(void *cls, int32_t success, const char *emsg)
                   DHT_OPERATION_TIMEOUT,
                   &put_www_dht,
                   NULL);
-  GNUNET_NAMESTORE_disconnect (namestore_handle);
   GNUNET_free (nrb);
 }