gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 02/03: cadet/client: Add a 'closed' state to <channel>.


From: gnunet
Subject: [gnunet-scheme] 02/03: cadet/client: Add a 'closed' state to <channel>.
Date: Mon, 29 Aug 2022 13:39:50 +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 4db6fcc926d7bd555e1dd4ccdc88603e8da8516b
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Mon Aug 29 13:09:47 2022 +0200

    cadet/client: Add a 'closed' state to <channel>.
    
    * gnu/gnunet/cadet/client.scm (<channel>)[channel-number]: Add a
    'closed' state, where 'channel-number' is set to #true.
    (reconnect)[channel-number->channel-hash-map]: Don't allow closed
    channels to be in the hash map.
---
 gnu/gnunet/cadet/client.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/gnunet/cadet/client.scm b/gnu/gnunet/cadet/client.scm
index cf5dc08..acd0dfe 100644
--- a/gnu/gnunet/cadet/client.scm
+++ b/gnu/gnunet/cadet/client.scm
@@ -87,7 +87,7 @@
          (only (rnrs base)
                begin define lambda assert quote cons apply values
                case else = define-syntax + expt - let* let and >
-               not if)
+               not if eq?)
          (only (rnrs control)
                unless)
          (only (rnrs hashtables)
@@ -121,7 +121,8 @@
              (immutable options channel-options)
              ;; Initially #false, when no channel number has been chosen yet
              ;; by the client.  When the control loop accepts the <channel>,
-             ;; a channel number is assigned.
+             ;; a channel number is assigned.  When a channel is closed, it is
+             ;; set to #true.
              ;;
              ;; After a reconnect, channel numbers are reset (TODO: implement 
that).
              (mutable channel-number channel-channel-number
@@ -162,7 +163,8 @@
     ;; channel-number->channel-hash-map:
     ;;   A hash map from channel numbers to their corresponding
     ;;   <channel> object, or nothing if the control loop
-    ;;   has not processes 'open-channel!' yet.
+    ;;   has not processes 'open-channel!' yet or if the channel
+    ;;   has been closed.
     ;;
     ;;   TODO: GC problems, split in external and internal parts
     (define (reconnect config terminal-condition 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]