Commit 5e04266e authored by Julien Lepiller's avatar Julien Lepiller

torrent: Fix typos.

* torrent/utils/fibers.scm: Fix elipsis use in syntax.
* torrent/fibers.scm: Add missing (ice-9 match), fix syntax accordingly,
fix typo in procedure name.
* torrent/peer.scm: Fix typos in field specificaton.
parent 10c5ac0b
......@@ -19,6 +19,7 @@
#:use-module (fibers)
#:use-module (fibers channels)
#:use-module (fibers operations)
#:use-module (ice-9 match)
#:use-module (torrent utils fibers)
#:use-module (torrent peer)
#:use-module (torrent protocol)
......@@ -40,7 +41,7 @@
(commanded-fiber
(lambda _
(put-message back-channel '(("type" . "error"))))
command-channel read-channel
(command-channel read-channel)
('received => (lambda* (#:key type message)
(match message
('keepalive #t); XXX: should we really not react to a keepalive?
......@@ -48,9 +49,9 @@
('timeout => (lambda* (#:key type)
(send-keep-alive sock)))
('chocke => (lambda* (#:key type)
(send-chocke sock)))
(send-choke sock)))
('unchocke => (lambda* (#:key type)
(send-unchocke sock)))
(send-unchoke sock)))
('interested => (lambda* (#:key type)
(send-interested sock)))
('not-interested => (lambda* (#:key type)
......
......@@ -49,7 +49,7 @@
merge-potential-peers))
(define-record-type peer
(make-peer id sock bitfield choking interested am-choking am-interested channel)
(make-peer id sock bitfield choking interested am-choking am-interested channel state)
peer?
(id peer-id)
(sock peer-sock)
......@@ -59,7 +59,7 @@
(am-choking peer-am-choking)
(am-interested peer-am-interested)
(channel peer-channel)
(satte peer-state))
(state peer-state))
(define-record-type potential-peer
(make-potential-peer host port freshness)
......
......@@ -21,7 +21,7 @@
#:use-module (fibers channels)
#:use-module (fibers operations)
#:use-module (fibers timers)
#:export (timeout-perform-operation put-nonblocking))
#:export (timeout-perform-operation put-nonblocking commanded-fiber))
(define (timeout-perform-operation time op)
(catch
......@@ -44,7 +44,7 @@
(define-syntax commanded-fiber
(syntax-rules ()
((_ handler channel ... (type => thunk) ...)
((_ handler (channel ...) (type => thunk) ...)
(lambda ()
(catch #t
(lambda ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment