[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r20618 - gnunet/src/namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r20618 - gnunet/src/namestore |
Date: |
Mon, 19 Mar 2012 20:10:10 +0100 |
Author: wachs
Date: 2012-03-19 20:10:10 +0100 (Mon, 19 Mar 2012)
New Revision: 20618
Modified:
gnunet/src/namestore/gnunet-service-namestore.c
gnunet/src/namestore/test_namestore_api_lookup.c
gnunet/src/namestore/test_namestore_api_zone_to_name.c
Log:
- minor changes
Modified: gnunet/src/namestore/gnunet-service-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-service-namestore.c 2012-03-19 18:51:32 UTC
(rev 20617)
+++ gnunet/src/namestore/gnunet-service-namestore.c 2012-03-19 19:10:10 UTC
(rev 20618)
@@ -1346,11 +1346,11 @@
ztn_ctx.rid = rid;
ztn_ctx.nc = nc;
- char * z_tmp = strdup (GNUNET_short_h2s (&ztn_msg->zone));
+ struct GNUNET_CRYPTO_ShortHashAsciiEncoded z_tmp;
+ GNUNET_CRYPTO_short_hash_to_enc(&ztn_msg->zone, &z_tmp);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Looking up name for zone `%s' in zone
`%s'\n",
- z_tmp,
+ (char *) &z_tmp,
GNUNET_short_h2s (&ztn_msg->value_zone));
- GNUNET_free (z_tmp);
GSN_database->zone_to_name (GSN_database->cls, &ztn_msg->zone,
&ztn_msg->value_zone, &handle_zone_to_name_it, &ztn_ctx);
@@ -1633,7 +1633,6 @@
GNUNET_CRYPTO_rsa_key_get_public(privkey, c->pubkey);
GNUNET_CRYPTO_short_hash(c->pubkey, sizeof (struct
GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &c->zone);
- //GNUNET_CRYPTO_short_hash_to_enc (&name_hase, &name_enc);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found zonefile for zone `%s'\n",
GNUNET_short_h2s (&c->zone));
GNUNET_CRYPTO_short_hash_double (&c->zone, &long_hash);
GNUNET_CONTAINER_multihashmap_put(zonekeys, &long_hash, c,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
Modified: gnunet/src/namestore/test_namestore_api_lookup.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_lookup.c 2012-03-19 18:51:32 UTC
(rev 20617)
+++ gnunet/src/namestore/test_namestore_api_lookup.c 2012-03-19 19:10:10 UTC
(rev 20618)
@@ -255,7 +255,7 @@
size_t rd_ser_len;
- /* load privat key */
+ /* load privat key from file not included in zonekey dir */
privkey = GNUNET_CRYPTO_rsa_key_create_from_file("test_hostkey");
GNUNET_assert (privkey != NULL);
/* get public key */
@@ -274,7 +274,6 @@
/* create random zone hash */
GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct
GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone);
-
start_arm (cfgfile);
GNUNET_assert (arm != NULL);
Modified: gnunet/src/namestore/test_namestore_api_zone_to_name.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_zone_to_name.c 2012-03-19
18:51:32 UTC (rev 20617)
+++ gnunet/src/namestore/test_namestore_api_zone_to_name.c 2012-03-19
19:10:10 UTC (rev 20618)
@@ -233,6 +233,7 @@
/* zone hash */
GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct
GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone);
GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_short_h2s
(&s_zone_value));
struct GNUNET_NAMESTORE_RecordData rd;
rd.expiration = GNUNET_TIME_absolute_get();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r20618 - gnunet/src/namestore,
gnunet <=