#include "gnunet_dns_service.h"
#include "gnunet_resolver_service.h"
#include "gnunet_dnsparser_lib.h"
-#include "../dns/dnsparser.h"
+#include "gns_protocol.h"
#include "gnunet_gns_service.h"
#include "block_gns.h"
#include "gns.h"
GNUNET_CRYPTO_rsa_key_free (gph->key);
GNUNET_CONTAINER_DLL_remove (gph_head, gph_tail, gph);
GNUNET_free (gph);
+ return;
}
- else
- memcpy (gph->test_name, name, strlen(name)+1);
+
+ memcpy (gph->test_name, name, strlen(name)+1);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"GNS_AUTO_PSEU: Checking %s for collision in NS\n",
struct GetPseuAuthorityHandle *gph;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded *pb_key;
-
- gph = GNUNET_malloc (sizeof (struct GetPseuAuthorityHandle));
-
+
GNUNET_CRYPTO_rsa_key_get_public (key, &pkey);
pb_key = GNUNET_CRYPTO_rsa_encode_key (key);
"GNS_NS: Error putting records into namestore: %s\n", emsg);
}
+
static void
handle_lookup_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct ResolverHandle *rh = cls;
- if (rh->timeout_cont)
+ if (NULL != rh->timeout_cont)
rh->timeout_cont (rh->timeout_cont_cls, tc);
+ /* FIXME: does this leak memory? */
}
+
/**
* Processor for background lookups in the DHT
*
&rh->authority))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Cannot convert ZKEY %s to hash!\n", string_hash);
+ "Cannot convert ZKEY `%s' to hash!\n", string_hash);
+ if (GNUNET_SCHEDULER_NO_TASK != rh->timeout_task)
+ GNUNET_SCHEDULER_cancel (rh->timeout_task);
GNUNET_CONTAINER_DLL_remove (rlh_head, rlh_tail, rh);
GNUNET_free (rh);
GNUNET_free (rlh);