diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-27 21:06:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-27 21:06:11 +0000 |
commit | 65b243be0941da4896afd842deda48cd0ce488e2 (patch) | |
tree | 019901e73101b13f9602fa8118aa7503e9ee7d32 /src | |
parent | 94f1bfcb5f933ea09b9e4d066685709eba423951 (diff) | |
download | gnunet-65b243be0941da4896afd842deda48cd0ce488e2.tar.gz gnunet-65b243be0941da4896afd842deda48cd0ce488e2.zip |
DHT api switch adjustments
Diffstat (limited to 'src')
-rw-r--r-- | src/fs/gnunet-service-fs_pr.c | 21 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_put.c | 2 | ||||
-rw-r--r-- | src/include/gnunet_dht_service.h | 7 | ||||
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 90 | ||||
-rw-r--r-- | src/vpn/gnunet-service-dns.c | 15 |
5 files changed, 65 insertions, 70 deletions
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index d47d28ce6..dd59170a2 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c | |||
@@ -941,10 +941,10 @@ test_put_load_too_high (uint32_t priority) | |||
941 | * @param cls closure | 941 | * @param cls closure |
942 | * @param exp when will this value expire | 942 | * @param exp when will this value expire |
943 | * @param key key of the result | 943 | * @param key key of the result |
944 | * @param get_path NULL-terminated array of pointers | 944 | * @param get_path peers on reply path (or NULL if not recorded) |
945 | * to the peers on reverse GET path (or NULL if not recorded) | 945 | * @param get_path_length number of entries in get_path |
946 | * @param put_path NULL-terminated array of pointers | 946 | * @param put_path peers on the PUT path (or NULL if not recorded) |
947 | * to the peers on the PUT path (or NULL if not recorded) | 947 | * @param put_path_length number of entries in get_path |
948 | * @param type type of the result | 948 | * @param type type of the result |
949 | * @param size number of bytes in data | 949 | * @param size number of bytes in data |
950 | * @param data pointer to the result data | 950 | * @param data pointer to the result data |
@@ -952,8 +952,10 @@ test_put_load_too_high (uint32_t priority) | |||
952 | static void | 952 | static void |
953 | handle_dht_reply (void *cls, struct GNUNET_TIME_Absolute exp, | 953 | handle_dht_reply (void *cls, struct GNUNET_TIME_Absolute exp, |
954 | const GNUNET_HashCode * key, | 954 | const GNUNET_HashCode * key, |
955 | const struct GNUNET_PeerIdentity *const *get_path, | 955 | const struct GNUNET_PeerIdentity *get_path, |
956 | const struct GNUNET_PeerIdentity *const *put_path, | 956 | unsigned int get_path_length, |
957 | const struct GNUNET_PeerIdentity *put_path, | ||
958 | unsigned int put_path_length, | ||
957 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) | 959 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) |
958 | { | 960 | { |
959 | struct GSF_PendingRequest *pr = cls; | 961 | struct GSF_PendingRequest *pr = cls; |
@@ -1032,9 +1034,10 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr) | |||
1032 | pr->gh = | 1034 | pr->gh = |
1033 | GNUNET_DHT_get_start (GSF_dht, GNUNET_TIME_UNIT_FOREVER_REL, | 1035 | GNUNET_DHT_get_start (GSF_dht, GNUNET_TIME_UNIT_FOREVER_REL, |
1034 | pr->public_data.type, &pr->public_data.query, | 1036 | pr->public_data.type, &pr->public_data.query, |
1035 | DEFAULT_GET_REPLICATION, | 1037 | 5 /* DEFAULT_GET_REPLICATION */, |
1036 | GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, pr->bf, | 1038 | GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, |
1037 | pr->mingle, xquery, xquery_size, &handle_dht_reply, | 1039 | /* FIXME: can no longer pass pr->bf/pr->mingle... */ |
1040 | xquery, xquery_size, &handle_dht_reply, | ||
1038 | pr); | 1041 | pr); |
1039 | } | 1042 | } |
1040 | 1043 | ||
diff --git a/src/fs/gnunet-service-fs_put.c b/src/fs/gnunet-service-fs_put.c index 5771b5665..4910144d1 100644 --- a/src/fs/gnunet-service-fs_put.c +++ b/src/fs/gnunet-service-fs_put.c | |||
@@ -161,7 +161,7 @@ process_dht_put_content (void *cls, const GNUNET_HashCode * key, size_t size, | |||
161 | "Retrieved block `%s' of type %u for DHT PUT\n", GNUNET_h2s (key), | 161 | "Retrieved block `%s' of type %u for DHT PUT\n", GNUNET_h2s (key), |
162 | type); | 162 | type); |
163 | #endif | 163 | #endif |
164 | GNUNET_DHT_put (GSF_dht, key, DEFAULT_PUT_REPLICATION, GNUNET_DHT_RO_NONE, | 164 | GNUNET_DHT_put (GSF_dht, key, 5 /* DEFAULT_PUT_REPLICATION */, GNUNET_DHT_RO_NONE, |
165 | type, size, data, expiration, GNUNET_TIME_UNIT_FOREVER_REL, | 165 | type, size, data, expiration, GNUNET_TIME_UNIT_FOREVER_REL, |
166 | &delay_dht_put_blocks, po); | 166 | &delay_dht_put_blocks, po); |
167 | } | 167 | } |
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h index 904357c92..fcbc8df47 100644 --- a/src/include/gnunet_dht_service.h +++ b/src/include/gnunet_dht_service.h | |||
@@ -41,6 +41,13 @@ extern "C" | |||
41 | 41 | ||
42 | 42 | ||
43 | /** | 43 | /** |
44 | * Default republication frequency for stored data in the DHT. | ||
45 | */ | ||
46 | #define GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 60) | ||
47 | |||
48 | |||
49 | |||
50 | /** | ||
44 | * Connection to the DHT service. | 51 | * Connection to the DHT service. |
45 | */ | 52 | */ |
46 | struct GNUNET_DHT_Handle; | 53 | struct GNUNET_DHT_Handle; |
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index c90cada1b..e26cf666e 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -577,10 +577,6 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
577 | * @param cls closure | 577 | * @param cls closure |
578 | * @param exp when will this value expire | 578 | * @param exp when will this value expire |
579 | * @param key key of the result | 579 | * @param key key of the result |
580 | * @param get_path NULL-terminated array of pointers | ||
581 | * to the peers on reverse GET path (or NULL if not recorded) | ||
582 | * @param put_path NULL-terminated array of pointers | ||
583 | * to the peers on the PUT path (or NULL if not recorded) | ||
584 | * @param type type of the result | 580 | * @param type type of the result |
585 | * @param size number of bytes in data | 581 | * @param size number of bytes in data |
586 | * @param data pointer to the result data | 582 | * @param data pointer to the result data |
@@ -588,8 +584,10 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
588 | static void | 584 | static void |
589 | dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, | 585 | dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, |
590 | const GNUNET_HashCode * key, | 586 | const GNUNET_HashCode * key, |
591 | const struct GNUNET_PeerIdentity *const *get_path, | 587 | const struct GNUNET_PeerIdentity *get_path, |
592 | const struct GNUNET_PeerIdentity *const *put_path, | 588 | unsigned int get_path_length, |
589 | const struct GNUNET_PeerIdentity *put_path, | ||
590 | unsigned int put_path_length, | ||
593 | enum GNUNET_BLOCK_Type type, size_t size, const void *data); | 591 | enum GNUNET_BLOCK_Type type, size_t size, const void *data); |
594 | 592 | ||
595 | 593 | ||
@@ -759,11 +757,9 @@ path_remove_from_peer (struct MeshPeerInfo *peer, | |||
759 | &id.hashPubKey, /*key to search */ | 757 | &id.hashPubKey, /*key to search */ |
760 | 4, /* replication level */ | 758 | 4, /* replication level */ |
761 | GNUNET_DHT_RO_RECORD_ROUTE, | 759 | GNUNET_DHT_RO_RECORD_ROUTE, |
762 | NULL, /* bloom filter */ | ||
763 | 0, /* mutator */ | ||
764 | NULL, /* xquery */ | 760 | NULL, /* xquery */ |
765 | 0, /* xquery bits */ | 761 | 0, /* xquery bits */ |
766 | dht_get_id_handler, | 762 | &dht_get_id_handler, |
767 | (void *) path_info); | 763 | (void *) path_info); |
768 | } | 764 | } |
769 | } | 765 | } |
@@ -839,27 +835,24 @@ path_add_to_origin (struct MeshPeerInfo *peer_info, struct MeshPeerPath *path) | |||
839 | * Build a PeerPath from the paths returned from the DHT, reversing the paths | 835 | * Build a PeerPath from the paths returned from the DHT, reversing the paths |
840 | * to obtain a local peer -> destination path and interning the peer ids. | 836 | * to obtain a local peer -> destination path and interning the peer ids. |
841 | * | 837 | * |
842 | * @param get_path NULL-terminated array of pointers | ||
843 | * to the peers on reverse GET path (or NULL if not recorded) | ||
844 | * @param put_path NULL-terminated array of pointers | ||
845 | * to the peers on the PUT path (or NULL if not recorded) | ||
846 | * | ||
847 | * @return Newly allocated and created path | 838 | * @return Newly allocated and created path |
848 | */ | 839 | */ |
849 | static struct MeshPeerPath * | 840 | static struct MeshPeerPath * |
850 | path_build_from_dht (const struct GNUNET_PeerIdentity *const *get_path, | 841 | path_build_from_dht (const struct GNUNET_PeerIdentity *get_path, |
851 | const struct GNUNET_PeerIdentity *const *put_path) | 842 | unsigned int get_path_length, |
843 | const struct GNUNET_PeerIdentity *put_path, | ||
844 | unsigned int put_path_length) | ||
852 | { | 845 | { |
853 | struct MeshPeerPath *p; | 846 | struct MeshPeerPath *p; |
854 | GNUNET_PEER_Id id; | 847 | GNUNET_PEER_Id id; |
855 | int i; | 848 | int i; |
856 | 849 | ||
857 | p = path_new (0); | 850 | p = path_new (0); |
858 | for (i = 0; get_path[i] != NULL; i++) ; | 851 | i = get_path_length; |
859 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "MESH: GET has %d hops.\n", i); | 852 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "MESH: GET has %d hops.\n", i); |
860 | for (i--; i >= 0; i--) | 853 | for (i--; i >= 0; i--) |
861 | { | 854 | { |
862 | id = GNUNET_PEER_intern (get_path[i]); | 855 | id = GNUNET_PEER_intern (&get_path[i]); |
863 | if (p->length > 0 && id == p->peers[p->length - 1]) | 856 | if (p->length > 0 && id == p->peers[p->length - 1]) |
864 | { | 857 | { |
865 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "MESH: Optimizing 1 hop out.\n"); | 858 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "MESH: Optimizing 1 hop out.\n"); |
@@ -873,11 +866,11 @@ path_build_from_dht (const struct GNUNET_PeerIdentity *const *get_path, | |||
873 | p->length++; | 866 | p->length++; |
874 | } | 867 | } |
875 | } | 868 | } |
876 | for (i = 0; put_path[i] != NULL; i++) ; | 869 | i = put_path_length; |
877 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "MESH: PUT has %d hops.\n", i); | 870 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "MESH: PUT has %d hops.\n", i); |
878 | for (i--; i >= 0; i--) | 871 | for (i--; i >= 0; i--) |
879 | { | 872 | { |
880 | id = GNUNET_PEER_intern (put_path[i]); | 873 | id = GNUNET_PEER_intern (&put_path[i]); |
881 | if (p->length > 0 && id == p->peers[p->length - 1]) | 874 | if (p->length > 0 && id == p->peers[p->length - 1]) |
882 | { | 875 | { |
883 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "MESH: Optimizing 1 hop out.\n"); | 876 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "MESH: Optimizing 1 hop out.\n"); |
@@ -894,10 +887,10 @@ path_build_from_dht (const struct GNUNET_PeerIdentity *const *get_path, | |||
894 | #if MESH_DEBUG | 887 | #if MESH_DEBUG |
895 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 888 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
896 | "MESH: (first of GET: %s)\n", | 889 | "MESH: (first of GET: %s)\n", |
897 | GNUNET_h2s_full(&get_path[0]->hashPubKey)); | 890 | GNUNET_h2s_full(&get_path[0].hashPubKey)); |
898 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 891 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
899 | "MESH: (first of PUT: %s)\n", | 892 | "MESH: (first of PUT: %s)\n", |
900 | GNUNET_h2s_full(&put_path[0]->hashPubKey)); | 893 | GNUNET_h2s_full(&put_path[0].hashPubKey)); |
901 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 894 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
902 | "MESH: In total: %d hops\n", | 895 | "MESH: In total: %d hops\n", |
903 | p->length); | 896 | p->length); |
@@ -2046,10 +2039,6 @@ notify_client_connection_failure (void *cls, size_t size, void *buf) | |||
2046 | * @param cls closure | 2039 | * @param cls closure |
2047 | * @param exp when will this value expire | 2040 | * @param exp when will this value expire |
2048 | * @param key key of the result | 2041 | * @param key key of the result |
2049 | * @param get_path NULL-terminated array of pointers | ||
2050 | * to the peers on reverse GET path (or NULL if not recorded) | ||
2051 | * @param put_path NULL-terminated array of pointers | ||
2052 | * to the peers on the PUT path (or NULL if not recorded) | ||
2053 | * @param type type of the result | 2042 | * @param type type of the result |
2054 | * @param size number of bytes in data | 2043 | * @param size number of bytes in data |
2055 | * @param data pointer to the result data | 2044 | * @param data pointer to the result data |
@@ -2059,8 +2048,10 @@ notify_client_connection_failure (void *cls, size_t size, void *buf) | |||
2059 | static void | 2048 | static void |
2060 | dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, | 2049 | dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, |
2061 | const GNUNET_HashCode * key, | 2050 | const GNUNET_HashCode * key, |
2062 | const struct GNUNET_PeerIdentity *const *get_path, | 2051 | const struct GNUNET_PeerIdentity *get_path, |
2063 | const struct GNUNET_PeerIdentity *const *put_path, | 2052 | unsigned int get_path_length, |
2053 | const struct GNUNET_PeerIdentity *put_path, | ||
2054 | unsigned int put_path_length, | ||
2064 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) | 2055 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) |
2065 | { | 2056 | { |
2066 | struct MeshPathInfo *path_info = cls; | 2057 | struct MeshPathInfo *path_info = cls; |
@@ -2080,17 +2071,16 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
2080 | GNUNET_BLOCK_TYPE_TEST, /* type */ | 2071 | GNUNET_BLOCK_TYPE_TEST, /* type */ |
2081 | &pi.hashPubKey, /*key to search */ | 2072 | &pi.hashPubKey, /*key to search */ |
2082 | 4, /* replication level */ | 2073 | 4, /* replication level */ |
2083 | GNUNET_DHT_RO_RECORD_ROUTE, NULL, /* bloom filter */ | 2074 | GNUNET_DHT_RO_RECORD_ROUTE, |
2084 | 0, /* mutator */ | ||
2085 | NULL, /* xquery */ | 2075 | NULL, /* xquery */ |
2086 | 0, /* xquery bits */ | 2076 | 0, /* xquery bits */ |
2087 | dht_get_id_handler, | 2077 | &dht_get_id_handler, |
2088 | (void *) path_info); | 2078 | (void *) path_info); |
2089 | return; | 2079 | return; |
2090 | } | 2080 | } |
2091 | } | 2081 | } |
2092 | 2082 | ||
2093 | p = path_build_from_dht (get_path, put_path); | 2083 | p = path_build_from_dht (get_path, get_path_length, put_path, put_path_length); |
2094 | path_add_to_peer (path_info->peer, p); | 2084 | path_add_to_peer (path_info->peer, p); |
2095 | for (i = 0; i < path_info->peer->ntunnels; i++) | 2085 | for (i = 0; i < path_info->peer->ntunnels; i++) |
2096 | { | 2086 | { |
@@ -2110,10 +2100,6 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
2110 | * @param cls closure | 2100 | * @param cls closure |
2111 | * @param exp when will this value expire | 2101 | * @param exp when will this value expire |
2112 | * @param key key of the result | 2102 | * @param key key of the result |
2113 | * @param get_path NULL-terminated array of pointers | ||
2114 | * to the peers on reverse GET path (or NULL if not recorded) | ||
2115 | * @param put_path NULL-terminated array of pointers | ||
2116 | * to the peers on the PUT path (or NULL if not recorded) | ||
2117 | * @param type type of the result | 2103 | * @param type type of the result |
2118 | * @param size number of bytes in data | 2104 | * @param size number of bytes in data |
2119 | * @param data pointer to the result data | 2105 | * @param data pointer to the result data |
@@ -2121,8 +2107,10 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
2121 | static void | 2107 | static void |
2122 | dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp, | 2108 | dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp, |
2123 | const GNUNET_HashCode * key, | 2109 | const GNUNET_HashCode * key, |
2124 | const struct GNUNET_PeerIdentity *const *get_path, | 2110 | const struct GNUNET_PeerIdentity *get_path, |
2125 | const struct GNUNET_PeerIdentity *const *put_path, | 2111 | unsigned int get_path_length, |
2112 | const struct GNUNET_PeerIdentity *put_path, | ||
2113 | unsigned int put_path_length, | ||
2126 | enum GNUNET_BLOCK_Type type, size_t size, | 2114 | enum GNUNET_BLOCK_Type type, size_t size, |
2127 | const void *data) | 2115 | const void *data) |
2128 | { | 2116 | { |
@@ -2162,8 +2150,6 @@ dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
2162 | /* replication level */ | 2150 | /* replication level */ |
2163 | GNUNET_DHT_RO_RECORD_ROUTE, | 2151 | GNUNET_DHT_RO_RECORD_ROUTE, |
2164 | /* option to dht: record route */ | 2152 | /* option to dht: record route */ |
2165 | NULL, /* bloom filter */ | ||
2166 | 0, /* mutator */ | ||
2167 | NULL, /* xquery */ | 2153 | NULL, /* xquery */ |
2168 | 0, /* xquery bits */ | 2154 | 0, /* xquery bits */ |
2169 | dht_get_id_handler, | 2155 | dht_get_id_handler, |
@@ -2171,7 +2157,7 @@ dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
2171 | peer_info); /* closure */ | 2157 | peer_info); /* closure */ |
2172 | } | 2158 | } |
2173 | 2159 | ||
2174 | p = path_build_from_dht (get_path, put_path); | 2160 | p = path_build_from_dht (get_path, get_path_length, put_path, put_path_length); |
2175 | path_add_to_peer (peer_info, p); | 2161 | path_add_to_peer (peer_info, p); |
2176 | tunnel_add_peer(t, peer_info); | 2162 | tunnel_add_peer(t, peer_info); |
2177 | p = tree_get_path_to_peer(t->tree, peer_info->id); | 2163 | p = tree_get_path_to_peer(t->tree, peer_info->id); |
@@ -2595,17 +2581,15 @@ handle_local_connect_add (void *cls, struct GNUNET_SERVER_Client *client, | |||
2595 | path_info->peer = peer_info; | 2581 | path_info->peer = peer_info; |
2596 | path_info->t = t; | 2582 | path_info->t = t; |
2597 | peer_info->dhtget = GNUNET_DHT_get_start(dht_handle, /* handle */ | 2583 | peer_info->dhtget = GNUNET_DHT_get_start(dht_handle, /* handle */ |
2598 | GNUNET_TIME_UNIT_FOREVER_REL, /* timeout */ | 2584 | GNUNET_TIME_UNIT_FOREVER_REL, /* timeout */ |
2599 | GNUNET_BLOCK_TYPE_TEST, /* type */ | 2585 | GNUNET_BLOCK_TYPE_TEST, /* type */ |
2600 | &peer_msg->peer.hashPubKey, /*key to search */ | 2586 | &peer_msg->peer.hashPubKey, /*key to search */ |
2601 | 4, /* replication level */ | 2587 | 4, /* replication level */ |
2602 | GNUNET_DHT_RO_RECORD_ROUTE, | 2588 | GNUNET_DHT_RO_RECORD_ROUTE, |
2603 | NULL, /* bloom filter */ | 2589 | NULL, /* xquery */ |
2604 | 0, /* mutator */ | 2590 | 0, /* xquery bits */ |
2605 | NULL, /* xquery */ | 2591 | &dht_get_id_handler, |
2606 | 0, /* xquery bits */ | 2592 | (void *) path_info); |
2607 | dht_get_id_handler, | ||
2608 | (void *) path_info); | ||
2609 | } | 2593 | } |
2610 | if (NULL != peer_info->path_head) | 2594 | if (NULL != peer_info->path_head) |
2611 | { | 2595 | { |
@@ -2761,7 +2745,7 @@ handle_local_connect_by_type (void *cls, struct GNUNET_SERVER_Client *client, | |||
2761 | c->dht_get_type = | 2745 | c->dht_get_type = |
2762 | GNUNET_DHT_get_start (dht_handle, GNUNET_TIME_UNIT_FOREVER_REL, | 2746 | GNUNET_DHT_get_start (dht_handle, GNUNET_TIME_UNIT_FOREVER_REL, |
2763 | GNUNET_BLOCK_TYPE_TEST, &hash, 10U, | 2747 | GNUNET_BLOCK_TYPE_TEST, &hash, 10U, |
2764 | GNUNET_DHT_RO_RECORD_ROUTE, NULL, 0, NULL, 0, | 2748 | GNUNET_DHT_RO_RECORD_ROUTE, NULL, 0, |
2765 | &dht_get_type_handler, t); | 2749 | &dht_get_type_handler, t); |
2766 | 2750 | ||
2767 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | 2751 | GNUNET_SERVER_receive_done (client, GNUNET_OK); |
diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index e97da1921..fc65cf608 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c | |||
@@ -641,10 +641,11 @@ static void | |||
641 | receive_dht (void *cls, struct GNUNET_TIME_Absolute exp | 641 | receive_dht (void *cls, struct GNUNET_TIME_Absolute exp |
642 | __attribute__ ((unused)), const GNUNET_HashCode * key | 642 | __attribute__ ((unused)), const GNUNET_HashCode * key |
643 | __attribute__ ((unused)), | 643 | __attribute__ ((unused)), |
644 | const struct GNUNET_PeerIdentity *const *get_path | 644 | const struct GNUNET_PeerIdentity *get_path __attribute__ ((unused)), |
645 | __attribute__ ((unused)), | 645 | unsigned int get_path_length __attribute__ ((unused)), |
646 | const struct GNUNET_PeerIdentity *const *put_path | 646 | const struct GNUNET_PeerIdentity *put_path __attribute__ ((unused)), |
647 | __attribute__ ((unused)), enum GNUNET_BLOCK_Type type, size_t size, | 647 | unsigned int put_path_length __attribute__ ((unused)), |
648 | enum GNUNET_BLOCK_Type type, size_t size, | ||
648 | const void *data) | 649 | const void *data) |
649 | { | 650 | { |
650 | 651 | ||
@@ -806,8 +807,8 @@ receive_query (void *cls | |||
806 | cls->handle = | 807 | cls->handle = |
807 | GNUNET_DHT_get_start (dht, GNUNET_TIME_UNIT_MINUTES, | 808 | GNUNET_DHT_get_start (dht, GNUNET_TIME_UNIT_MINUTES, |
808 | GNUNET_BLOCK_TYPE_DNS, &key, | 809 | GNUNET_BLOCK_TYPE_DNS, &key, |
809 | DEFAULT_GET_REPLICATION, GNUNET_DHT_RO_NONE, NULL, | 810 | 5 /* DEFAULT_GET_REPLICATION */, GNUNET_DHT_RO_NONE, NULL, |
810 | 0, NULL, 0, receive_dht, cls); | 811 | 0, &receive_dht, cls); |
811 | 812 | ||
812 | goto outfree; | 813 | goto outfree; |
813 | } | 814 | } |
@@ -1251,7 +1252,7 @@ publish_name (const char *name, uint64_t ports, uint32_t service_type, | |||
1251 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Putting with key %08x, size = %d\n", | 1252 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Putting with key %08x, size = %d\n", |
1252 | *((unsigned int *) &data.service_descriptor), size); | 1253 | *((unsigned int *) &data.service_descriptor), size); |
1253 | 1254 | ||
1254 | GNUNET_DHT_put (dht, &data.service_descriptor, DEFAULT_PUT_REPLICATION, | 1255 | GNUNET_DHT_put (dht, &data.service_descriptor, 5 /* DEFAULT_PUT_REPLICATION */, |
1255 | GNUNET_DHT_RO_NONE, GNUNET_BLOCK_TYPE_DNS, size, | 1256 | GNUNET_DHT_RO_NONE, GNUNET_BLOCK_TYPE_DNS, size, |
1256 | (char *) &data, | 1257 | (char *) &data, |
1257 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS), | 1258 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS), |