gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 32/42: server: Add type checking to make-loop.


From: gnunet
Subject: [gnunet-scheme] 32/42: server: Add type checking to make-loop.
Date: Sat, 10 Sep 2022 19:08:25 +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 fa0f2f49e832d80f291cb97e9a2f176b479dbe30
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sat Sep 10 13:06:14 2022 +0200

    server: Add type checking to make-loop.
---
 gnu/gnunet/server.scm | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/gnu/gnunet/server.scm b/gnu/gnunet/server.scm
index 13be42d..b9b952f 100644
--- a/gnu/gnunet/server.scm
+++ b/gnu/gnunet/server.scm
@@ -31,21 +31,23 @@
          loop:spawner loop:lost-and-found run-loop spawn-server-loop)
   (import (only (rnrs base)
                begin define cons case else apply values quote lambda
-               if error list let and append)
+               if error list let and append assert string? procedure?)
          (only (rnrs records syntactic)
                define-record-type)
          (only (fibers)
                spawn-fiber)
          (only (fibers conditions)
-               make-condition wait-operation signal-condition!)
+               make-condition wait-operation signal-condition! condition?)
          (only (fibers channels)
                make-channel put-operation get-operation put-message
-               get-message)
+               get-message channel?)
+         (only (gnu gnunet config db)
+               configuration?)
          (only (fibers operations)
                choice-operation perform-operation wrap-operation)
          (only (gnu gnunet concurrency lost-and-found)
                make-lost-and-found collect-lost-and-found-operation
-               losable-lost-and-found)
+               losable-lost-and-found lost-and-found?)
          (only (gnu gnunet mq)
                close-queue!)
          (only (gnu gnunet mq error-reporting)
@@ -188,6 +190,16 @@ this maybe-sends @code{disconnect!} to the control 
channel."
                   control-channel lost-and-found (connected values)
                   (disconnected values)
                   #:allow-other-keys)
+         (assert (string? service-name))
+         (assert (procedure? control-message-handler))
+         (assert (procedure? make-message-handlers))
+         (assert (configuration? configuration))
+         (assert (procedure? spawn))
+         (assert (condition? terminal-condition))
+         (assert (channel? control-channel))
+         (assert (lost-and-found? lost-and-found))
+         (assert (procedure? connected))
+         (assert (procedure? disconnected))
          (%make service-name control-message-handler
                 make-message-handlers make-error-handler* configuration
                 spawn 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]