gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] 01/11: dht/client: Simplify by eliminating the lost-and-


From: gnunet
Subject: [gnunet-scheme] 01/11: dht/client: Simplify by eliminating the lost-and-found field.
Date: Thu, 30 Jun 2022 00:49:21 +0200

This is an automated email from the git hooks/post-receive script.

maxime-devos pushed a commit to branch master
in repository gnunet-scheme.

commit fbb8276c00a09e701d77a201d3d70e90f61d483a
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Wed Jun 29 21:35:22 2022 +0000

    dht/client: Simplify by eliminating the lost-and-found field.
    
    It already exists in the parent record type.
    
    * gnu/gnunet/dht/client.scm (<server>): Remove 'lost-and-found',
    adjust protocol appropriately.
    (connect): Use 'losable-lost-and-found' instead of removed
    'server-lost-and-found'.
---
 gnu/gnunet/dht/client.scm | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/gnu/gnunet/dht/client.scm b/gnu/gnunet/dht/client.scm
index db999fb..8cb7ee2 100644
--- a/gnu/gnunet/dht/client.scm
+++ b/gnu/gnunet/dht/client.scm
@@ -102,7 +102,8 @@
          (only (gnu gnunet mq error-reporting)
                report-error)
          (only (gnu gnunet concurrency lost-and-found)
-               make-lost-and-found collect-lost-and-found-operation)
+               make-lost-and-found collect-lost-and-found-operation
+               losable-lost-and-found)
          (gnu gnunet dht struct)
          (only (gnu gnunet message protocols)
                message-type)
@@ -584,14 +585,11 @@ currently unsupported."
       ;; terminal-condition: a disconnect has been requested
       (fields (immutable terminal-condition server-terminal-condition)
              (immutable control-channel server-control-channel)
-             (immutable lost-and-found server-lost-and-found)
              ;; Atomic box holding an unsigned 64-bit integer.
              (immutable next-unique-id/box server-next-unique-id/box))
       (protocol (lambda (%make)
                  (lambda ()
-                   (define lost-and-found (make-lost-and-found))
-                   ((%make lost-and-found) (make-condition) (make-channel)
-                    lost-and-found
+                   ((%make (make-lost-and-found)) (make-condition) 
(make-channel)
                     ;; Any ‘small’ natural number will do.
                     (make-atomic-box 0))))))
 
@@ -622,7 +620,7 @@ do anything if @var{server} has been permanently 
disconnected."
                    ;; When not lingering, add this search object to the lost
                    ;; and found, such that it will eventually be cancelled.
                    ((%make (and (not linger?)
-                                (server-lost-and-found server)))
+                                (losable-lost-and-found server)))
                     server found query unique-id options linger?)))))
 
     (define-record-type (<put> %make-put put?)
@@ -762,7 +760,7 @@ code automatically tries to reconnect, so @var{connected} 
can be called after
       ;; but that causes ‘(DHT) garbage collectable’ to fail.
       (spawn-procedure spawn (server-terminal-condition server) config
                       old-id->operation-map (server-control-channel server)
-                      (server-lost-and-found server) #:connected connected
+                      (losable-lost-and-found server) #:connected connected
                       #:disconnected disconnected #:spawn spawn)
       server)
     (define (spawn-procedure spawn . rest)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]