diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-19 19:09:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-19 19:09:28 +0000 |
commit | 7b8acf8915fcedc4d905487ce0f7f3ff4ab201f4 (patch) | |
tree | 60bd85d90797a26b8ad34caf1b32c8c45fc93f8b /src/util/network.c | |
parent | bdeb92f66e328fc964423310300a18981d9eb1af (diff) | |
download | gnunet-7b8acf8915fcedc4d905487ce0f7f3ff4ab201f4.tar.gz gnunet-7b8acf8915fcedc4d905487ce0f7f3ff4ab201f4.zip |
-eliminate more uses of ShortHashCode, breaks signatures
Diffstat (limited to 'src/util/network.c')
-rw-r--r-- | src/util/network.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util/network.c b/src/util/network.c index 454de1e50..00b0413e2 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -114,16 +114,16 @@ GNUNET_NETWORK_shorten_unixpath (char *unixpath) | |||
114 | struct sockaddr_un dummy; | 114 | struct sockaddr_un dummy; |
115 | size_t slen; | 115 | size_t slen; |
116 | char *end; | 116 | char *end; |
117 | struct GNUNET_CRYPTO_ShortHashCode sh; | 117 | struct GNUNET_HashCode sh; |
118 | struct GNUNET_CRYPTO_ShortHashAsciiEncoded ae; | 118 | struct GNUNET_CRYPTO_HashAsciiEncoded ae; |
119 | size_t upm; | 119 | size_t upm; |
120 | 120 | ||
121 | upm = sizeof (dummy.sun_path); | 121 | upm = sizeof (dummy.sun_path); |
122 | slen = strlen (unixpath); | 122 | slen = strlen (unixpath); |
123 | if (slen < upm) | 123 | if (slen < upm) |
124 | return unixpath; /* no shortening required */ | 124 | return unixpath; /* no shortening required */ |
125 | GNUNET_CRYPTO_short_hash (unixpath, slen, &sh); | 125 | GNUNET_CRYPTO_hash (unixpath, slen, &sh); |
126 | while (sizeof (struct GNUNET_CRYPTO_ShortHashAsciiEncoded) + | 126 | while (sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) + |
127 | strlen (unixpath) >= upm) | 127 | strlen (unixpath) >= upm) |
128 | { | 128 | { |
129 | if (NULL == (end = strrchr (unixpath, '/'))) | 129 | if (NULL == (end = strrchr (unixpath, '/'))) |
@@ -136,8 +136,8 @@ GNUNET_NETWORK_shorten_unixpath (char *unixpath) | |||
136 | } | 136 | } |
137 | *end = '\0'; | 137 | *end = '\0'; |
138 | } | 138 | } |
139 | GNUNET_CRYPTO_short_hash_to_enc (&sh, &ae); | 139 | GNUNET_CRYPTO_hash_to_enc (&sh, &ae); |
140 | strcat (unixpath, (char*) ae.short_encoding); | 140 | strcat (unixpath, (char*) ae.encoding); |
141 | return unixpath; | 141 | return unixpath; |
142 | } | 142 | } |
143 | 143 | ||