aboutsummaryrefslogtreecommitdiff
path: root/src/namestore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-27 19:05:53 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-27 19:05:53 +0000
commit968c522ea9f43890b81815b2bf9fc13901257ffe (patch)
tree17f1a8cda913cc254df8d119e3ddef0b7a11c0d3 /src/namestore
parent64d3e46cfb99a711e500fa1f114e7c44bdf10040 (diff)
-fix
Diffstat (limited to 'src/namestore')
-rw-r--r--src/namestore/test_namestore_api_lookup.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/namestore/test_namestore_api_lookup.c b/src/namestore/test_namestore_api_lookup.c
index 0f1c133bbc..c60354e9e6 100644
--- a/src/namestore/test_namestore_api_lookup.c
+++ b/src/namestore/test_namestore_api_lookup.c
@@ -217,7 +217,6 @@ run (void *cls,
{
size_t rd_ser_len;
struct GNUNET_TIME_Absolute et;
- char rd_ser[rd_ser_len];
endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
&endbadly, NULL);
@@ -233,23 +232,26 @@ run (void *cls,
s_rd = create_record (RECORDS);
rd_ser_len = GNUNET_NAMESTORE_records_get_size(RECORDS, s_rd);
- GNUNET_NAMESTORE_records_serialize(RECORDS, s_rd, rd_ser_len, rd_ser);
-
- /* sign */
- et.abs_value = s_rd[0].expiration_time;
- s_signature = GNUNET_NAMESTORE_create_signature (privkey, et, s_name,
- s_rd, RECORDS);
-
- /* create random zone hash */
- GNUNET_CRYPTO_short_hash (&pubkey,
- sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
- &s_zone);
- nsh = GNUNET_NAMESTORE_connect (cfg);
- GNUNET_break (NULL != nsh);
- nsqe = GNUNET_NAMESTORE_record_put (nsh, &pubkey, s_name,
- GNUNET_TIME_UNIT_FOREVER_ABS,
- RECORDS, s_rd, s_signature,
- &put_cont, s_name);
+ {
+ char rd_ser[rd_ser_len];
+ GNUNET_NAMESTORE_records_serialize(RECORDS, s_rd, rd_ser_len, rd_ser);
+
+ /* sign */
+ et.abs_value = s_rd[0].expiration_time;
+ s_signature = GNUNET_NAMESTORE_create_signature (privkey, et, s_name,
+ s_rd, RECORDS);
+
+ /* create random zone hash */
+ GNUNET_CRYPTO_short_hash (&pubkey,
+ sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+ &s_zone);
+ nsh = GNUNET_NAMESTORE_connect (cfg);
+ GNUNET_break (NULL != nsh);
+ nsqe = GNUNET_NAMESTORE_record_put (nsh, &pubkey, s_name,
+ GNUNET_TIME_UNIT_FOREVER_ABS,
+ RECORDS, s_rd, s_signature,
+ &put_cont, s_name);
+ }
}