gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 05/42: dht/client: Bring API of reconnect mostly in line


From: gnunet
Subject: [gnunet-scheme] 05/42: dht/client: Bring API of reconnect mostly in line with (gnu gnunet server).
Date: Sat, 10 Sep 2022 19:07:58 +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 f614867cf71dac95d98ce02352ece674234c88e8
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Thu Sep 8 20:14:38 2022 +0200

    dht/client: Bring API of reconnect mostly in line with (gnu gnunet server).
    
    * gnu/gnunet/dht/client.scm
    (reconnect): Use more keyword arguments.
    (connect): Adjust appropriately.
---
 gnu/gnunet/dht/client.scm | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/gnu/gnunet/dht/client.scm b/gnu/gnunet/dht/client.scm
index a58a473..217d3d7 100644
--- a/gnu/gnunet/dht/client.scm
+++ b/gnu/gnunet/dht/client.scm
@@ -752,9 +752,12 @@ code automatically tries to reconnect, so @var{connected} 
can be called after
       (define server (make-server))
       ;; We could do @code{(spawn (lambda () (reconnect ...)))} here instead,
       ;; but that causes ‘(DHT) garbage collectable’ to fail.
-      (spawn-procedure spawn (server-terminal-condition server) config
-                      old-id->operation-map (server-control-channel server)
-                      (losable-lost-and-found server) #:connected connected
+      (spawn-procedure spawn old-id->operation-map
+                      #:terminal-condition (server-terminal-condition server)
+                      #:config config
+                      #:control-channel (server-control-channel server)
+                      #:lost-and-found (losable-lost-and-found server)
+                      #:connected connected
                       #:disconnected disconnected #:spawn spawn)
       server)
     (define (spawn-procedure spawn . rest)
@@ -837,9 +840,10 @@ operation is cancelled, return @code{#false} instead."
 
     (define empty-bbtree (make-bbtree <))
 
-    (define* (reconnect terminal-condition config
-                       old-id->operation-map control-channel lost-and-found
-                       #:key (spawn spawn-fiber)
+    (define* (reconnect old-id->operation-map
+                       #:key terminal-condition config
+                       control-channel lost-and-found
+                       (spawn spawn-fiber)
                        connected disconnected
                        #:rest rest)
       ;; The 'id->operation-map' holds get operations that have
@@ -884,8 +888,7 @@ operation is cancelled, return @code{#false} instead."
       (define (k/reconnect! old-id->operation-map id->operation-map)
        ;; Self-check to make sure no information will be lost.
        (assert (= (bbtree-size old-id->operation-map) 0))
-       (apply reconnect terminal-condition config id->operation-map
-              control-channel lost-and-found rest))
+       (apply reconnect id->operation-map rest))
       (define loop-operation
        (choice-operation
         (get-operation control-channel)

-- 
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]