diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-12-29 20:47:17 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-12-29 20:47:17 +0100 |
commit | 9e0d7d411363999bca89f7e7b4e2896b8f6ec931 (patch) | |
tree | 667e3d8d2eeff8d3384f373dcb7a7b6d5da8a64a /src/dht | |
parent | 9859314207ad10e37b73eacd5dfccac59ec8153e (diff) | |
download | gnunet-9e0d7d411363999bca89f7e7b4e2896b8f6ec931.tar.gz gnunet-9e0d7d411363999bca89f7e7b4e2896b8f6ec931.zip |
-migrate code to new block API
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/gnunet-service-dht_neighbours.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index 75bdaed53..d48d2a5df 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c | |||
@@ -1859,18 +1859,17 @@ handle_find_peer (const struct GNUNET_PeerIdentity *sender, | |||
1859 | /* first, check about our own HELLO */ | 1859 | /* first, check about our own HELLO */ |
1860 | if (NULL != GDS_my_hello) | 1860 | if (NULL != GDS_my_hello) |
1861 | { | 1861 | { |
1862 | hello_size = GNUNET_HELLO_size ((const struct | 1862 | hello_size = GNUNET_HELLO_size ( |
1863 | GNUNET_HELLO_Message *) GDS_my_hello); | 1863 | (const struct GNUNET_HELLO_Message *) GDS_my_hello); |
1864 | GNUNET_break (hello_size >= sizeof(struct GNUNET_MessageHeader)); | 1864 | GNUNET_break (hello_size >= sizeof(struct GNUNET_MessageHeader)); |
1865 | if (GNUNET_BLOCK_EVALUATION_OK_MORE == | 1865 | if (GNUNET_BLOCK_REPLY_OK_MORE == |
1866 | GNUNET_BLOCK_evaluate (GDS_block_context, | 1866 | GNUNET_BLOCK_check_reply (GDS_block_context, |
1867 | GNUNET_BLOCK_TYPE_DHT_HELLO, | 1867 | GNUNET_BLOCK_TYPE_DHT_HELLO, |
1868 | bg, | 1868 | bg, |
1869 | GNUNET_BLOCK_EO_LOCAL_SKIP_CRYPTO, | 1869 | &my_identity_hash, |
1870 | &my_identity_hash, | 1870 | NULL, 0, |
1871 | NULL, 0, | 1871 | GDS_my_hello, |
1872 | GDS_my_hello, | 1872 | hello_size)) |
1873 | hello_size)) | ||
1874 | { | 1873 | { |
1875 | GDS_NEIGHBOURS_handle_reply (sender, | 1874 | GDS_NEIGHBOURS_handle_reply (sender, |
1876 | GNUNET_BLOCK_TYPE_DHT_HELLO, | 1875 | GNUNET_BLOCK_TYPE_DHT_HELLO, |
@@ -1933,16 +1932,16 @@ handle_find_peer (const struct GNUNET_PeerIdentity *sender, | |||
1933 | peer = bucket->head; | 1932 | peer = bucket->head; |
1934 | hello = GDS_HELLO_get (peer->id); | 1933 | hello = GDS_HELLO_get (peer->id); |
1935 | } | 1934 | } |
1935 | /* FIXME: this logic is strange. extra ';', maybe, but then why a while-loop at all? */ | ||
1936 | while ((NULL == hello) || | 1936 | while ((NULL == hello) || |
1937 | (GNUNET_BLOCK_EVALUATION_OK_MORE != | 1937 | (GNUNET_BLOCK_REPLY_OK_MORE != |
1938 | GNUNET_BLOCK_evaluate (GDS_block_context, | 1938 | GNUNET_BLOCK_check_reply (GDS_block_context, |
1939 | GNUNET_BLOCK_TYPE_DHT_HELLO, | 1939 | GNUNET_BLOCK_TYPE_DHT_HELLO, |
1940 | bg, | 1940 | bg, |
1941 | GNUNET_BLOCK_EO_LOCAL_SKIP_CRYPTO, | 1941 | &peer->phash, |
1942 | &peer->phash, | 1942 | NULL, 0, |
1943 | NULL, 0, | 1943 | hello, |
1944 | hello, | 1944 | (hello_size = GNUNET_HELLO_size (hello))))); |
1945 | (hello_size = GNUNET_HELLO_size (hello))))); | ||
1946 | GDS_NEIGHBOURS_handle_reply (sender, | 1945 | GDS_NEIGHBOURS_handle_reply (sender, |
1947 | GNUNET_BLOCK_TYPE_DHT_HELLO, | 1946 | GNUNET_BLOCK_TYPE_DHT_HELLO, |
1948 | GNUNET_TIME_relative_to_absolute | 1947 | GNUNET_TIME_relative_to_absolute |