From: Christian Grothoff Date: Wed, 21 Mar 2012 15:59:43 +0000 (+0000) Subject: -fix X-Git-Tag: initial-import-from-subversion-38251~14164 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=be1cb5dac2503d0ca293a2737551d1cdc3002ea3;p=oweals%2Fgnunet.git -fix --- diff --git a/src/namestore/namestore_common.c b/src/namestore/namestore_common.c index 403f75ea8..498d38027 100644 --- a/src/namestore/namestore_common.c +++ b/src/namestore/namestore_common.c @@ -292,6 +292,7 @@ GNUNET_NAMESTORE_value_to_string (uint32_t type, size_t data_size) { char tmp[INET6_ADDRSTRLEN]; + struct GNUNET_CRYPTO_ShortHashAsciiEncoded enc; switch (type) { @@ -328,9 +329,11 @@ GNUNET_NAMESTORE_value_to_string (uint32_t type, return NULL; return GNUNET_strdup (tmp); case GNUNET_NAMESTORE_TYPE_PKEY: - if (data_size != sizeof (GNUNET_HashCode)) + if (data_size != sizeof (struct GNUNET_ShortHashCode)) return NULL; - return GNUNET_strdup (GNUNET_h2s_full (data)); + GNUNET_CRYPTO_short_hash_to_enc (data, + &enc); + return GNUNET_strdup (enc.short_encoding); case GNUNET_NAMESTORE_TYPE_PSEU: return GNUNET_strndup (data, data_size); default: