gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 01/02: cadet/client: Correct multiplicity of return valu


From: gnunet
Subject: [gnunet-scheme] 01/02: cadet/client: Correct multiplicity of return values.
Date: Thu, 25 Aug 2022 18:14:08 +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 28f0c33c27693a9a7d7b3a0ee6e835119fce3acd
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Thu Aug 25 18:09:17 2022 +0200

    cadet/client: Correct multiplicity of return values.
    
    The mentioned test is introduced in the following commit.
    
    * gnu/gnunet/cadet/client.scm
    (reconnect)[control*]{send-channel-stuff!}: Return nothing instead
    of *unspecified*.
    (make-channel-sender): Likewise.
---
 gnu/gnunet/cadet/client.scm | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/gnu/gnunet/cadet/client.scm b/gnu/gnunet/cadet/client.scm
index f3dd477..aa9d738 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)
+               not if)
          (only (rnrs control)
                unless)
          (only (rnrs hashtables)
@@ -241,8 +241,13 @@
             ;; The mutation 'replace > by >=' is caught by
             ;; "data is not sent before an acknowledgement"
             ;; in form of a hang.
-            (unless (> (channel-allow-send channel) 0)
-              (stop)))
+            (if (> (channel-allow-send channel) 0)
+                ;; (unless ...) and (when ...) can return *unspecified*,
+                ;; but (gnu gnunet mq) expects no return values. Detected
+                ;; by the "data is properly sent in response to 
acknowledgements, in-order"
+                ;; test.
+                (values)
+                (stop)))
           (define (decrement!)
             (set-channel-allow-send! channel
                                      (- (channel-allow-send channel) 1)))
@@ -486,7 +491,9 @@ received, it is passed to the appropriate handler."
        (maybe-send-control-message! server
                                     'send-channel-stuff!
                                     message-queue
-                                    (force channel-promise))))
+                                    (force channel-promise))
+       ;; the #true or #false return value does not appear relevant here
+       (values)))
 
     ;; TODO: call when mq is closed, maybe unify closing the message queue
     ;; and the 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]