aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
authorArthur Dewarumez <arthur.dewarumez@etudiant.univ-lille1.fr>2015-04-30 22:38:35 +0000
committerArthur Dewarumez <arthur.dewarumez@etudiant.univ-lille1.fr>2015-04-30 22:38:35 +0000
commita3817a1cbb2468ce4d9a86b0bfbab3f648cb7446 (patch)
tree816f05f9a78f07da008b413cd9895e6d2a5edeab /src/dht
parentee3eab264bbd26a7f1afd3f001628600dff84b11 (diff)
downloadgnunet-a3817a1cbb2468ce4d9a86b0bfbab3f648cb7446.tar.gz
gnunet-a3817a1cbb2468ce4d9a86b0bfbab3f648cb7446.zip
Adding function GDS_NEIGHBOURS_send_get_result()
Diffstat (limited to 'src/dht')
-rw-r--r--src/dht/gnunet-service-wdht_neighbours.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/dht/gnunet-service-wdht_neighbours.c b/src/dht/gnunet-service-wdht_neighbours.c
index a536f6df5..77a9b852c 100644
--- a/src/dht/gnunet-service-wdht_neighbours.c
+++ b/src/dht/gnunet-service-wdht_neighbours.c
@@ -717,8 +717,6 @@ delete_trail (struct Trail *trail,
717} 717}
718 718
719 719
720
721
722/** 720/**
723 * Blah. 721 * Blah.
724 */ 722 */
@@ -805,8 +803,19 @@ GDS_NEIGHBOURS_send_get_result (const struct GNUNET_HashCode *trail_id,
805 const void *data, 803 const void *data,
806 size_t data_size) 804 size_t data_size)
807{ 805{
808 /* basically: call 'forward_message_on_trail'; 806 struct GNUNET_MessageHeader *payload;
809 NOTE: ignore 'next_target/have_path' for now... */ 807
808 payload = GNUNET_malloc(sizeof(struct GNUNET_MessageHeader) + data_size);
809 payload->size = data_size;
810 payload->type = GNUNET_MESSAGE_TYPE_WDHT_GET_RESULT;
811
812 forward_message_on_trail (NULL /* FIXME: put something right */,
813 trail_id,
814 0/* FIXME: put something right */,
815 &my_identity,
816 put_path,
817 put_path_length,
818 payload);
810} 819}
811 820
812 821
@@ -866,9 +875,10 @@ handle_core_disconnect (void *cls,
866static struct FriendInfo * 875static struct FriendInfo *
867pick_random_friend () 876pick_random_friend ()
868{ 877{
869 /* FIXME: implement (easy..., use: 878 /* FIXME: in my opinion, if have to pick a random friend from the friend_map
870 GNUNET_CONTAINER_multipeermap_get_random ()... */ 879 but i can't find a function to get a random friend from a mutlipeer_map */
871 return NULL; // FIXME... 880 /* return GNUNET_CONTAINER_multipeermap_get_random (friends_peermap); */
881 return NULL;
872} 882}
873 883
874 884