size_t key_len = 0;
char* pkey_tmp;
+ if (NULL == name)
+ {
+ return NULL;
+ }
+
if (NULL != shorten_key)
{
pkey_enc = GNUNET_CRYPTO_rsa_encode_key (shorten_key);
key_len = ntohs (pkey_enc->len);
}
- if (NULL == name)
- {
- return NULL;
- }
-
msize = sizeof (struct GNUNET_GNS_ClientLookupMessage)
+ key_len + strlen(name) + 1;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Trying to lookup %s in GNS\n", name);
rd.flags = 0;
finish_lookup (rh, rlh, 1, &rd);
- free_resolver_handle (rh);
GNUNET_RESOLVER_request_cancel (rh->dns_resolver_handle);
+ free_resolver_handle (rh);
}
/**
struct sockaddr *sa;
int i;
struct RecordLookupHandle *rlh = rh->proc_cls;
+
+ memset (&packet, 0, sizeof (struct GNUNET_DNSPARSER_Packet));
/* We cancel here as to not include the ns lookup in the timeout */
if (rh->timeout_task != GNUNET_SCHEDULER_NO_TASK)
* would already have an entry in the NS for the record)
* 5. We are not in cache only mode
*/
- if (((rh->status & RSL_RECORD_EXPIRED) || (rh->status &!RSL_RECORD_EXISTS))
- && GNUNET_CRYPTO_short_hash_cmp(&rh->authority_chain_head->zone,
+ if (( ((rh->status & RSL_RECORD_EXPIRED) != 0) ||
+ ((rh->status & RSL_RECORD_EXISTS) == 0) ) &&
+ GNUNET_CRYPTO_short_hash_cmp(&rh->authority_chain_head->zone,
&rh->private_local_zone) &&
(strcmp(rh->name, "+") == 0) &&
(rh->only_cached == GNUNET_NO))
struct GNUNET_CRYPTO_RsaSignature *sig;
struct GNUNET_NAMESTORE_RecordData rd;
+ memset (&rd, 0, sizeof (struct GNUNET_NAMESTORE_RecordData));
rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value;
rd.data_size = strlen(TEST_PSEU_ALICE)+1;
rd.data = TEST_PSEU_ALICE;