GNUNET_HashCode zone;
uint32_t no_flags;
uint32_t flags;
+ int has_zone;
};
it->proc = proc;
it->proc_cls = proc;
it->op_id = rid;
- it->zone = *zone;
+
+ if (NULL != zone)
+ {
+ it->zone = *zone;
+ it->has_zone = GNUNET_YES;
+ }
+ else
+ {
+ memset (&it->zone, '\0', sizeof (it->zone));
+ it->has_zone = GNUNET_NO;
+ }
GNUNET_CONTAINER_DLL_insert_tail(h->z_head, h->z_tail, it);
/* set msg_size*/
msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START);
msg->gns_header.header.size = htons (msg_size);
msg->gns_header.r_id = htonl (rid);
- if (NULL == zone)
+ if (NULL != zone)
msg->zone = *zone;
else
memset (&msg->zone, '\0', sizeof (msg->zone));
static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
static GNUNET_HashCode zone;
+static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2;
+static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2;
+static GNUNET_HashCode zone2;
+
static struct GNUNET_NAMESTORE_ZoneIterator *zi;
static int res;
char * s_name_2;
struct GNUNET_NAMESTORE_RecordData *s_rd_2;
+struct GNUNET_CRYPTO_RsaSignature *sig_3;
+char * s_name_3;
+struct GNUNET_NAMESTORE_RecordData *s_rd_3;
+
static void
start_arm (const char *cfgname)
{
GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey);
GNUNET_CRYPTO_hash(&pubkey, sizeof (pubkey), &zone);
+ privkey2 = GNUNET_CRYPTO_rsa_key_create_from_file("hostkey2");
+ GNUNET_assert (privkey2 != NULL);
+ GNUNET_CRYPTO_rsa_key_get_public(privkey2, &pubkey2);
+ GNUNET_CRYPTO_hash(&pubkey2, sizeof (pubkey), &zone2);
+
+
start_arm (cfgfile);
GNUNET_assert (arm != NULL);
sig_2 = GNUNET_NAMESTORE_create_signature(privkey, s_name_2, s_rd_2, 1);
GNUNET_NAMESTORE_record_create(nsh, privkey, s_name_2, s_rd_2, &put_cont, NULL);
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 3\n");
+ /* name in different zone */
+ GNUNET_asprintf(&s_name_3, "dummy3");
+ s_rd_3 = create_record(1);
+ sig_3 = GNUNET_NAMESTORE_create_signature(privkey, s_name_3, s_rd_3, 1);
+ GNUNET_NAMESTORE_record_put (nsh, &pubkey2, s_name_3, GNUNET_TIME_absolute_get_forever(), 1, s_rd_3, sig_3, &put_cont, NULL);
}
static int