aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-11-28 19:43:21 +0000
committerChristian Grothoff <christian@grothoff.org>2013-11-28 19:43:21 +0000
commitbe7b16f744d7c840498874f57dacfe9403080056 (patch)
treed53317d4e70aaacf613b295a412630ebdcf54a5a /src/fs
parentce30893f17420b6db33927575a324d0e9f3ea6de (diff)
downloadgnunet-be7b16f744d7c840498874f57dacfe9403080056.tar.gz
gnunet-be7b16f744d7c840498874f57dacfe9403080056.zip
-fix left-over confusion between hash code and peer identity size from recent peer identity format change
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/fs_download.c2
-rw-r--r--src/fs/fs_search.c4
-rw-r--r--src/fs/gnunet-service-fs_lc.c16
3 files changed, 10 insertions, 12 deletions
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c
index 997d42e18..f9f5c0a06 100644
--- a/src/fs/fs_download.c
+++ b/src/fs/fs_download.c
@@ -2081,7 +2081,7 @@ create_download_context (struct GNUNET_FS_Handle *h,
2081 GNUNET_break (0); 2081 GNUNET_break (0);
2082 return NULL; 2082 return NULL;
2083 } 2083 }
2084 dc = GNUNET_malloc (sizeof (struct GNUNET_FS_DownloadContext)); 2084 dc = GNUNET_new (struct GNUNET_FS_DownloadContext);
2085 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2085 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2086 "Starting download %p, %u bytes at offset %llu\n", 2086 "Starting download %p, %u bytes at offset %llu\n",
2087 dc, 2087 dc,
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index 52bc4aca0..90b5eb215 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -1077,7 +1077,7 @@ transmit_search_request (void *cls, size_t size, void *buf)
1077 sm->header.size = htons (msize); 1077 sm->header.size = htons (msize);
1078 sm->type = htonl (GNUNET_BLOCK_TYPE_FS_UBLOCK); 1078 sm->type = htonl (GNUNET_BLOCK_TYPE_FS_UBLOCK);
1079 sm->anonymity_level = htonl (sc->anonymity); 1079 sm->anonymity_level = htonl (sc->anonymity);
1080 memset (&sm->target, 0, sizeof (struct GNUNET_HashCode)); 1080 memset (&sm->target, 0, sizeof (struct GNUNET_PeerIdentity));
1081 sm->query = sc->requests[sc->keyword_offset].uquery; 1081 sm->query = sc->requests[sc->keyword_offset].uquery;
1082 GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map, 1082 GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
1083 &build_result_set, &mbc); 1083 &build_result_set, &mbc);
@@ -1105,7 +1105,7 @@ transmit_search_request (void *cls, size_t size, void *buf)
1105 GNUNET_assert (size >= msize); 1105 GNUNET_assert (size >= msize);
1106 sm->type = htonl (GNUNET_BLOCK_TYPE_FS_UBLOCK); 1106 sm->type = htonl (GNUNET_BLOCK_TYPE_FS_UBLOCK);
1107 sm->anonymity_level = htonl (sc->anonymity); 1107 sm->anonymity_level = htonl (sc->anonymity);
1108 memset (&sm->target, 0, sizeof (struct GNUNET_HashCode)); 1108 memset (&sm->target, 0, sizeof (struct GNUNET_PeerIdentity));
1109 GNUNET_CRYPTO_ecdsa_public_key_derive (&sc->uri->data.sks.ns, 1109 GNUNET_CRYPTO_ecdsa_public_key_derive (&sc->uri->data.sks.ns,
1110 sc->uri->data.sks.identifier, 1110 sc->uri->data.sks.identifier,
1111 "fs-ublock", 1111 "fs-ublock",
diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c
index 6d62085e6..0f1d69198 100644
--- a/src/fs/gnunet-service-fs_lc.c
+++ b/src/fs/gnunet-service-fs_lc.c
@@ -296,17 +296,16 @@ client_response_handler (void *cls, enum GNUNET_BLOCK_EvaluationResult eval,
296 * @param client identification of the client 296 * @param client identification of the client
297 * @param message the actual message 297 * @param message the actual message
298 * @param prptr where to store the pending request handle for the request 298 * @param prptr where to store the pending request handle for the request
299 * @return GNUNET_YES to start local processing, 299 * @return #GNUNET_YES to start local processing,
300 * GNUNET_NO to not (yet) start local processing, 300 * #GNUNET_NO to not (yet) start local processing,
301 * GNUNET_SYSERR on error 301 * #GNUNET_SYSERR on error
302 */ 302 */
303int 303int
304GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client, 304GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
305 const struct GNUNET_MessageHeader 305 const struct GNUNET_MessageHeader *message,
306 *message,
307 struct GSF_PendingRequest **prptr) 306 struct GSF_PendingRequest **prptr)
308{ 307{
309 static struct GNUNET_HashCode all_zeros; 308 static struct GNUNET_PeerIdentity all_zeros;
310 const struct SearchMessage *sm; 309 const struct SearchMessage *sm;
311 struct GSF_LocalClient *lc; 310 struct GSF_LocalClient *lc;
312 struct ClientRequest *cr; 311 struct ClientRequest *cr;
@@ -378,9 +377,8 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
378 &sm->query, 377 &sm->query,
379 (0 != 378 (0 !=
380 memcmp (&sm->target, &all_zeros, 379 memcmp (&sm->target, &all_zeros,
381 sizeof (struct GNUNET_HashCode))) 380 sizeof (struct GNUNET_PeerIdentity)))
382 ? (const struct GNUNET_PeerIdentity *) 381 ? &sm->target : NULL, NULL, 0,
383 &sm->target : NULL, NULL, 0,
384 0 /* bf */ , 382 0 /* bf */ ,
385 ntohl (sm->anonymity_level), 383 ntohl (sm->anonymity_level),
386 0 /* priority */ , 384 0 /* priority */ ,