aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-03-19 19:10:10 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-03-19 19:10:10 +0000
commit324d77d9a7f318705a862dbeb733d7a2af9e1cfd (patch)
tree34be82d3f518e08c145a22b0ae784d76812a0dd2 /src
parentd2fb255905f0c93f50db2112594307bb1265742c (diff)
downloadgnunet-324d77d9a7f318705a862dbeb733d7a2af9e1cfd.tar.gz
gnunet-324d77d9a7f318705a862dbeb733d7a2af9e1cfd.zip
- minor changes
Diffstat (limited to 'src')
-rw-r--r--src/namestore/gnunet-service-namestore.c7
-rw-r--r--src/namestore/test_namestore_api_lookup.c3
-rw-r--r--src/namestore/test_namestore_api_zone_to_name.c1
3 files changed, 5 insertions, 6 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 012555539..519814e77 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -1346,11 +1346,11 @@ static void handle_zone_to_name (void *cls,
1346 ztn_ctx.rid = rid; 1346 ztn_ctx.rid = rid;
1347 ztn_ctx.nc = nc; 1347 ztn_ctx.nc = nc;
1348 1348
1349 char * z_tmp = strdup (GNUNET_short_h2s (&ztn_msg->zone)); 1349 struct GNUNET_CRYPTO_ShortHashAsciiEncoded z_tmp;
1350 GNUNET_CRYPTO_short_hash_to_enc(&ztn_msg->zone, &z_tmp);
1350 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Looking up name for zone `%s' in zone `%s'\n", 1351 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Looking up name for zone `%s' in zone `%s'\n",
1351 z_tmp, 1352 (char *) &z_tmp,
1352 GNUNET_short_h2s (&ztn_msg->value_zone)); 1353 GNUNET_short_h2s (&ztn_msg->value_zone));
1353 GNUNET_free (z_tmp);
1354 1354
1355 GSN_database->zone_to_name (GSN_database->cls, &ztn_msg->zone, &ztn_msg->value_zone, &handle_zone_to_name_it, &ztn_ctx); 1355 GSN_database->zone_to_name (GSN_database->cls, &ztn_msg->zone, &ztn_msg->value_zone, &handle_zone_to_name_it, &ztn_ctx);
1356 1356
@@ -1633,7 +1633,6 @@ int zonekey_file_it (void *cls, const char *filename)
1633 GNUNET_CRYPTO_rsa_key_get_public(privkey, c->pubkey); 1633 GNUNET_CRYPTO_rsa_key_get_public(privkey, c->pubkey);
1634 GNUNET_CRYPTO_short_hash(c->pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &c->zone); 1634 GNUNET_CRYPTO_short_hash(c->pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &c->zone);
1635 1635
1636 //GNUNET_CRYPTO_short_hash_to_enc (&name_hase, &name_enc);
1637 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found zonefile for zone `%s'\n", GNUNET_short_h2s (&c->zone)); 1636 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found zonefile for zone `%s'\n", GNUNET_short_h2s (&c->zone));
1638 GNUNET_CRYPTO_short_hash_double (&c->zone, &long_hash); 1637 GNUNET_CRYPTO_short_hash_double (&c->zone, &long_hash);
1639 GNUNET_CONTAINER_multihashmap_put(zonekeys, &long_hash, c, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY); 1638 GNUNET_CONTAINER_multihashmap_put(zonekeys, &long_hash, c, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
diff --git a/src/namestore/test_namestore_api_lookup.c b/src/namestore/test_namestore_api_lookup.c
index 5be939a89..b6b681566 100644
--- a/src/namestore/test_namestore_api_lookup.c
+++ b/src/namestore/test_namestore_api_lookup.c
@@ -255,7 +255,7 @@ run (void *cls, char *const *args, const char *cfgfile,
255 255
256 size_t rd_ser_len; 256 size_t rd_ser_len;
257 257
258 /* load privat key */ 258 /* load privat key from file not included in zonekey dir */
259 privkey = GNUNET_CRYPTO_rsa_key_create_from_file("test_hostkey"); 259 privkey = GNUNET_CRYPTO_rsa_key_create_from_file("test_hostkey");
260 GNUNET_assert (privkey != NULL); 260 GNUNET_assert (privkey != NULL);
261 /* get public key */ 261 /* get public key */
@@ -274,7 +274,6 @@ run (void *cls, char *const *args, const char *cfgfile,
274 274
275 /* create random zone hash */ 275 /* create random zone hash */
276 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone); 276 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone);
277
278 start_arm (cfgfile); 277 start_arm (cfgfile);
279 GNUNET_assert (arm != NULL); 278 GNUNET_assert (arm != NULL);
280 279
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c
index 60168f82d..be90663f0 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -233,6 +233,7 @@ run (void *cls, char *const *args, const char *cfgfile,
233 /* zone hash */ 233 /* zone hash */
234 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone); 234 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone);
235 GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value); 235 GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value);
236 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_short_h2s (&s_zone_value));
236 237
237 struct GNUNET_NAMESTORE_RecordData rd; 238 struct GNUNET_NAMESTORE_RecordData rd;
238 rd.expiration = GNUNET_TIME_absolute_get(); 239 rd.expiration = GNUNET_TIME_absolute_get();