aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet-service-dht.c')
-rw-r--r--src/dht/gnunet-service-dht.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index c03e0b1ac..48661fd88 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -1024,10 +1024,11 @@ try_core_send (void *cls,
1024 * @param peer the peer to forward the message to 1024 * @param peer the peer to forward the message to
1025 * @param msg_ctx the context of the message (hop count, bloom, etc.) 1025 * @param msg_ctx the context of the message (hop count, bloom, etc.)
1026 */ 1026 */
1027static void forward_result_message (void *cls, 1027static void
1028 const struct GNUNET_MessageHeader *msg, 1028forward_result_message (void *cls,
1029 struct PeerInfo *peer, 1029 const struct GNUNET_MessageHeader *msg,
1030 struct DHT_MessageContext *msg_ctx) 1030 struct PeerInfo *peer,
1031 struct DHT_MessageContext *msg_ctx)
1031{ 1032{
1032 struct GNUNET_DHT_P2PRouteResultMessage *result_message; 1033 struct GNUNET_DHT_P2PRouteResultMessage *result_message;
1033 struct P2PPendingMessage *pending; 1034 struct P2PPendingMessage *pending;
@@ -1045,6 +1046,8 @@ static void forward_result_message (void *cls,
1045 result_message = (struct GNUNET_DHT_P2PRouteResultMessage *)pending->msg; 1046 result_message = (struct GNUNET_DHT_P2PRouteResultMessage *)pending->msg;
1046 result_message->header.size = htons(msize); 1047 result_message->header.size = htons(msize);
1047 result_message->header.type = htons(GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE_RESULT); 1048 result_message->header.type = htons(GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE_RESULT);
1049 result_message->put_path_length = htons(0); /* FIXME: implement */
1050 result_message->get_path_length = htons(0); /* FIXME: implement */
1048 result_message->options = htonl(msg_ctx->msg_options); 1051 result_message->options = htonl(msg_ctx->msg_options);
1049 result_message->hop_count = htonl(msg_ctx->hop_count + 1); 1052 result_message->hop_count = htonl(msg_ctx->hop_count + 1);
1050 GNUNET_assert(GNUNET_OK == GNUNET_CONTAINER_bloomfilter_get_raw_data(msg_ctx->bloom, result_message->bloomfilter, DHT_BLOOM_SIZE)); 1053 GNUNET_assert(GNUNET_OK == GNUNET_CONTAINER_bloomfilter_get_raw_data(msg_ctx->bloom, result_message->bloomfilter, DHT_BLOOM_SIZE));
@@ -1882,7 +1885,8 @@ send_reply_to_client (struct ClientList *client,
1882 reply = (struct GNUNET_DHT_RouteResultMessage *)&pending_message[1]; 1885 reply = (struct GNUNET_DHT_RouteResultMessage *)&pending_message[1];
1883 reply->header.type = htons (GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT); 1886 reply->header.type = htons (GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT);
1884 reply->header.size = htons (tsize); 1887 reply->header.size = htons (tsize);
1885 reply->reserved = 0; 1888 reply->put_path_length = htons(0); /* FIXME: implement */
1889 reply->get_path_length = htons(0); /* FIXME: implement */
1886 reply->unique_id = GNUNET_htonll (uid); 1890 reply->unique_id = GNUNET_htonll (uid);
1887 reply->key = *key; 1891 reply->key = *key;
1888 memcpy (&reply[1], message, msize); 1892 memcpy (&reply[1], message, msize);