aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-03-21 15:59:43 +0000
committerChristian Grothoff <christian@grothoff.org>2012-03-21 15:59:43 +0000
commitbe1cb5dac2503d0ca293a2737551d1cdc3002ea3 (patch)
treea85eccb0161106dfa8dfd89b27b50af0acb9c31b /src
parent13c5308bd3b81ff92bba7708124f47846fe26c3d (diff)
downloadgnunet-be1cb5dac2503d0ca293a2737551d1cdc3002ea3.tar.gz
gnunet-be1cb5dac2503d0ca293a2737551d1cdc3002ea3.zip
-fix
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: