[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30958 - gnunet/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30958 - gnunet/src/fs |
Date: |
Thu, 28 Nov 2013 20:43:21 +0100 |
Author: grothoff
Date: 2013-11-28 20:43:21 +0100 (Thu, 28 Nov 2013)
New Revision: 30958
Modified:
gnunet/src/fs/fs_download.c
gnunet/src/fs/fs_search.c
gnunet/src/fs/gnunet-service-fs_lc.c
Log:
-fix left-over confusion between hash code and peer identity size from recent
peer identity format change
Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2013-11-28 19:38:30 UTC (rev 30957)
+++ gnunet/src/fs/fs_download.c 2013-11-28 19:43:21 UTC (rev 30958)
@@ -2081,7 +2081,7 @@
GNUNET_break (0);
return NULL;
}
- dc = GNUNET_malloc (sizeof (struct GNUNET_FS_DownloadContext));
+ dc = GNUNET_new (struct GNUNET_FS_DownloadContext);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting download %p, %u bytes at offset %llu\n",
dc,
Modified: gnunet/src/fs/fs_search.c
===================================================================
--- gnunet/src/fs/fs_search.c 2013-11-28 19:38:30 UTC (rev 30957)
+++ gnunet/src/fs/fs_search.c 2013-11-28 19:43:21 UTC (rev 30958)
@@ -1077,7 +1077,7 @@
sm->header.size = htons (msize);
sm->type = htonl (GNUNET_BLOCK_TYPE_FS_UBLOCK);
sm->anonymity_level = htonl (sc->anonymity);
- memset (&sm->target, 0, sizeof (struct GNUNET_HashCode));
+ memset (&sm->target, 0, sizeof (struct GNUNET_PeerIdentity));
sm->query = sc->requests[sc->keyword_offset].uquery;
GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
&build_result_set, &mbc);
@@ -1105,7 +1105,7 @@
GNUNET_assert (size >= msize);
sm->type = htonl (GNUNET_BLOCK_TYPE_FS_UBLOCK);
sm->anonymity_level = htonl (sc->anonymity);
- memset (&sm->target, 0, sizeof (struct GNUNET_HashCode));
+ memset (&sm->target, 0, sizeof (struct GNUNET_PeerIdentity));
GNUNET_CRYPTO_ecdsa_public_key_derive (&sc->uri->data.sks.ns,
sc->uri->data.sks.identifier,
"fs-ublock",
Modified: gnunet/src/fs/gnunet-service-fs_lc.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_lc.c 2013-11-28 19:38:30 UTC (rev
30957)
+++ gnunet/src/fs/gnunet-service-fs_lc.c 2013-11-28 19:43:21 UTC (rev
30958)
@@ -296,17 +296,16 @@
* @param client identification of the client
* @param message the actual message
* @param prptr where to store the pending request handle for the request
- * @return GNUNET_YES to start local processing,
- * GNUNET_NO to not (yet) start local processing,
- * GNUNET_SYSERR on error
+ * @return #GNUNET_YES to start local processing,
+ * #GNUNET_NO to not (yet) start local processing,
+ * #GNUNET_SYSERR on error
*/
int
GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader
- *message,
+ const struct GNUNET_MessageHeader
*message,
struct GSF_PendingRequest **prptr)
{
- static struct GNUNET_HashCode all_zeros;
+ static struct GNUNET_PeerIdentity all_zeros;
const struct SearchMessage *sm;
struct GSF_LocalClient *lc;
struct ClientRequest *cr;
@@ -378,9 +377,8 @@
&sm->query,
(0 !=
memcmp (&sm->target, &all_zeros,
- sizeof (struct
GNUNET_HashCode)))
- ? (const struct GNUNET_PeerIdentity
*)
- &sm->target : NULL, NULL, 0,
+ sizeof (struct
GNUNET_PeerIdentity)))
+ ? &sm->target : NULL, NULL, 0,
0 /* bf */ ,
ntohl (sm->anonymity_level),
0 /* priority */ ,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30958 - gnunet/src/fs,
gnunet <=