{
GNUNET_break (0);
force_reconnect (h);
+ GNUNET_free(qe);
return;
}
GNUNET_CLIENT_receive (h->client, &process_message, h,
GNUNET_TIME_UNIT_FOREVER_REL);
qe->shorten_proc(qe->proc_cls, short_name);
+ GNUNET_free(qe);
}
if (ntohs (((struct GNUNET_MessageHeader*)msg)->size) <
sizeof (struct GNUNET_GNS_ClientGetAuthResultMessage))
{
+ GNUNET_free(qe);
GNUNET_break (0);
force_reconnect (h);
return;
GNUNET_CLIENT_receive (h->client, &process_message, h,
GNUNET_TIME_UNIT_FOREVER_REL);
qe->auth_proc(qe->proc_cls, auth_name);
+ GNUNET_free(qe);
}
/**
if (len < sizeof (struct GNUNET_GNS_ClientLookupResultMessage))
{
+ GNUNET_free(qe);
GNUNET_break (0);
force_reconnect (h);
return;
ntohl(msg->rd_count));
qe->lookup_proc(qe->proc_cls, rd_count, rd);
}
+ GNUNET_free(qe);
}
/**
/**
* Initialize the resolver
+ *
+ * @param nh the namestore handle
+ * @param dh the dht handle
+ * @return GNUNET_OK on success
*/
int
gns_resolver_init(struct GNUNET_NAMESTORE_Handle *nh,
return GNUNET_SYSERR;
}
+/**
+ * Set the callback to call when we discover a
+ * new authority via the DHT
+ *
+ * @param adb the callback to set
+ *
+void
+gns_resolver_set_auth_discovered_cb(AuthorityDiscoveredProcessor adb)
+{
+ auth_discovered = adb;
+}
+*/
/**
* Helper function to free resolver handle
sig,
&commence_testing,
NULL);
-
+ GNUNET_free(sig);
+ GNUNET_CRYPTO_rsa_key_free(bob_key);
+ GNUNET_CRYPTO_rsa_key_free(alice_key);
}
static void
alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile);
GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey);
+
+ GNUNET_free(alice_keyfile);
struct GNUNET_NAMESTORE_RecordData rd;
char* ip = TEST_IP;
&rd,
&commence_testing,
NULL);
+
+ GNUNET_CRYPTO_rsa_key_free(alice_key);
+ GNUNET_free(web);
}
/* put alice into bobs zone */
GNUNET_CRYPTO_hash(&alice_pkey, sizeof(alice_pkey), &alice_hash);
rd.data = &alice_hash;
- sig = GNUNET_NAMESTORE_create_signature(bob_key, GNUNET_TIME_absolute_get_forever(), TEST_AUTHORITY_ALICE,
+ sig = GNUNET_NAMESTORE_create_signature(bob_key,
+ GNUNET_TIME_absolute_get_forever(),
+ TEST_AUTHORITY_ALICE,
&rd, 1);
GNUNET_NAMESTORE_record_put (namestore_handle,
sig,
NULL,
NULL);
-
+ GNUNET_free(sig);
/* put www A record and PSEU into alice's zone */
rd.data_size = sizeof(struct in_addr);
rd.data = web;
rd.record_type = GNUNET_DNSPARSER_TYPE_A;
- sig = GNUNET_NAMESTORE_create_signature(alice_key,GNUNET_TIME_absolute_get_forever(), TEST_RECORD_NAME,
+ sig = GNUNET_NAMESTORE_create_signature(alice_key,
+ GNUNET_TIME_absolute_get_forever(),
+ TEST_RECORD_NAME,
&rd, 1);
GNUNET_NAMESTORE_record_put (namestore_handle,
sig,
NULL,
NULL);
-
+
rd.data_size = sizeof(GNUNET_HashCode);
rd.data = &alice_hash;
rd.record_type = GNUNET_GNS_RECORD_PKEY;
&commence_testing,
NULL);
-
+ GNUNET_free(web);
+ GNUNET_CRYPTO_rsa_key_free(our_key);
+ GNUNET_CRYPTO_rsa_key_free(bob_key);
+ GNUNET_CRYPTO_rsa_key_free(alice_key);
}
static void