diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-30 22:06:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-30 22:06:01 +0000 |
commit | 575974a0052370af5d92d3b43450057b055c9c20 (patch) | |
tree | 7b0e3706d0ada9c34851e26cf27ac7cb8bc9909d /src/namestore | |
parent | 73fd8b4cdab17f46f08eaaf403697584b43c8d19 (diff) | |
download | gnunet-575974a0052370af5d92d3b43450057b055c9c20.tar.gz gnunet-575974a0052370af5d92d3b43450057b055c9c20.zip |
-fixing build issues in namestore related to #3047
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/namestore_api_common.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/namestore/namestore_api_common.c b/src/namestore/namestore_api_common.c index d54dc3e7f..9026e8b61 100644 --- a/src/namestore/namestore_api_common.c +++ b/src/namestore/namestore_api_common.c | |||
@@ -509,7 +509,6 @@ GNUNET_NAMESTORE_value_to_string (uint32_t type, | |||
509 | const void *data, | 509 | const void *data, |
510 | size_t data_size) | 510 | size_t data_size) |
511 | { | 511 | { |
512 | struct GNUNET_CRYPTO_HashAsciiEncoded s_peer; | ||
513 | const char *cdata; | 512 | const char *cdata; |
514 | char* result; | 513 | char* result; |
515 | char tmp[INET6_ADDRSTRLEN]; | 514 | char tmp[INET6_ADDRSTRLEN]; |
@@ -650,10 +649,9 @@ GNUNET_NAMESTORE_value_to_string (uint32_t type, | |||
650 | ('\0' != cdata[data_size - 1]) ) | 649 | ('\0' != cdata[data_size - 1]) ) |
651 | return NULL; /* malformed */ | 650 | return NULL; /* malformed */ |
652 | vpn = data; | 651 | vpn = data; |
653 | GNUNET_CRYPTO_hash_to_enc (&vpn->peer.hashPubKey, &s_peer); | ||
654 | if (0 == GNUNET_asprintf (&vpn_str, "%u %s %s", | 652 | if (0 == GNUNET_asprintf (&vpn_str, "%u %s %s", |
655 | (unsigned int) ntohs (vpn->proto), | 653 | (unsigned int) ntohs (vpn->proto), |
656 | (const char*) &s_peer, | 654 | (const char*) GNUNET_i2s_full (&vpn->peer), |
657 | (const char*) &vpn[1])) | 655 | (const char*) &vpn[1])) |
658 | { | 656 | { |
659 | GNUNET_free (vpn_str); | 657 | GNUNET_free (vpn_str); |
@@ -978,8 +976,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type, | |||
978 | } | 976 | } |
979 | *data_size = sizeof (struct GNUNET_TUN_GnsVpnRecord) + strlen (s_serv) + 1; | 977 | *data_size = sizeof (struct GNUNET_TUN_GnsVpnRecord) + strlen (s_serv) + 1; |
980 | *data = vpn = GNUNET_malloc (*data_size); | 978 | *data = vpn = GNUNET_malloc (*data_size); |
981 | if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string ((char*)&s_peer, | 979 | if (GNUNET_OK != GNUNET_CRYPTO_ecc_public_sign_key_from_string ((char*) s_peer, |
982 | &vpn->peer.hashPubKey)) | 980 | strlen (s_peer), |
981 | &vpn->peer)) | ||
983 | { | 982 | { |
984 | GNUNET_free (vpn); | 983 | GNUNET_free (vpn); |
985 | *data_size = 0; | 984 | *data_size = 0; |