aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/namestore/namestore_common.c7
1 files changed, 5 insertions, 2 deletions
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,
292 size_t data_size) 292 size_t data_size)
293{ 293{
294 char tmp[INET6_ADDRSTRLEN]; 294 char tmp[INET6_ADDRSTRLEN];
295 struct GNUNET_CRYPTO_ShortHashAsciiEncoded enc;
295 296
296 switch (type) 297 switch (type)
297 { 298 {
@@ -328,9 +329,11 @@ GNUNET_NAMESTORE_value_to_string (uint32_t type,
328 return NULL; 329 return NULL;
329 return GNUNET_strdup (tmp); 330 return GNUNET_strdup (tmp);
330 case GNUNET_NAMESTORE_TYPE_PKEY: 331 case GNUNET_NAMESTORE_TYPE_PKEY:
331 if (data_size != sizeof (GNUNET_HashCode)) 332 if (data_size != sizeof (struct GNUNET_ShortHashCode))
332 return NULL; 333 return NULL;
333 return GNUNET_strdup (GNUNET_h2s_full (data)); 334 GNUNET_CRYPTO_short_hash_to_enc (data,
335 &enc);
336 return GNUNET_strdup (enc.short_encoding);
334 case GNUNET_NAMESTORE_TYPE_PSEU: 337 case GNUNET_NAMESTORE_TYPE_PSEU:
335 return GNUNET_strndup (data, data_size); 338 return GNUNET_strndup (data, data_size);
336 default: 339 default: