| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
* tests/network-size.scm (%estimates): Add two cases.
* gnu/gnunet/nse/client.scm
(reconnect)[handlers]<msg:nse:estimate>{well-formed?}: Adjust XXX.
|
|
|
|
|
|
|
|
| |
See <https://bugs.gnunet.org/view.php?id=7021#c18399>.
* doc/scheme-gnunet.tm
(Estimation of the size of the network)[estimate:standard-deviation]:
Document it.
|
| |
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm (handle-output!): Remove TODO about
closing.
|
|
|
|
|
|
|
|
| |
* README.org
(Message queues, List of errors, Configuration, Network structures)
(GNUnet network structures, network size estimation): Delete.
* gnu/gnunet/mq.scm (make-message-queue): Remove reference to
README.org, point to the manual instead.
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/config/fs.scm
(locate-defaults,load-configuration): New procedures.
* doc/scheme-gnunet.tm
(Loading configuration files): Document new procedure.
* gnu/gnunet/config/default.conf: New file.
* Makefile.am (nobase_dist_guilesite_DATA): Add new file.
|
|
|
|
| |
* gnu/gnunet/config/fs.scm: Remove TODO's at the top of the file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/config/fs.scm
(make-expanded-configuration): New procedure.
* doc/scheme-gnunet.tm (Loading configuration files):
Document new procedure.
* tests/config-fs.scm
(load-string->config/expanded, load-string->alist/expanded):
New procedures.
("make-expanded-configuration, one variable"
("make-expanded-configuration, expand variable (via getenv)")
("make-expanded-configuration, expand variable (via getenv, fancyness)")
("make-expanded-configuration, expand variable (via PATHS)")
("make-expanded-configuration, expand variable (via PATHS + getenv)")
("make-expanded-configuration, loop detected"): New tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/scheme-gnunet.tm (Loading configuration files): Unstub section.
* gnu/gnunet/config/fs.scm (load-configuration/port!): New procedure.
* tests/config-fs.scm
(load-string->alist/unexpanded): New procedure.
("load-configuration/port!, literal read-value")
("load-configuration/port!, empty")
("load-configuration/port!, assignment outside section")
("load-configuration/port!, literal read-value after empty line")
("load-configuration/port!, section after empty line")
("load-configuration/port!, bogus syntax before section")
("load-configuration/port!, bogus syntax after section")
("load-configuration/port!, skip comment (#) after section")
("load-configuration/port!, skip comment (%) after section")
("load-configuration/port!, skip empty line after section")
("load-configuration/port!, skip comment (#) before section")
("load-configuration/port!, skip comment (%) before section")
("load-configuration/port!, skip empty line before section")
("load-configuration/port!, two sections"): New tests.
|
|
|
|
|
|
|
|
| |
* Makefile.am (modules): Add new module.
(SCM_TESTS): Add new tests.
* doc/scheme-gnunet.tm (Locating configuration files): New section.
* gnu/gnunet/config/fs.scm: New module.
* tests/config-fs.scm: New test file.
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(<server>)[request-close?/box]: New field.
(disconnect!): Set new box before signalling the condition.
(reconnect)[error-handler]{input:regular-end-of-file,input:premature-end-of-file}:
When the new box holds #t as value, don't reconnect.
(connect): Adjust callers.
* tests/network-size.scm
("close, connected --> all fibers stop, two callbacks called"): New test.
|
|
|
|
|
|
|
|
| |
'connect' always sets it, so it doesn't need to be set here
as well. This also prevents accidentally calling 'spawn-fiber' to
a degree.
* gnu/gnunet/nse/client.scm (reconnect): Remove default for 'spawn'.
|
|
|
|
|
|
|
| |
For better error handling
* gnu/gnunet/nse/client.scm (connect): Remove 'rest'. Adjust call to
'reconnect'.
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm (reconnect): Spawn 'request-close-handler'
with 'spawn' instead of 'spawn-fiber'.
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(reconnect)[error-handler]{else}: New branch, reporting
the error and closing the queue.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some changes to nse/client will be necessary.
* Makefile.am
(modules): Add new module.
(SCM_TESTS): Add new test.
* doc/scheme-gnunet.tm
(Error handler): Suggest reporting errors.
(Error reporting): New section.
* gnu/gnunet/mq/error-reporting.scm: New module.
* tests/error-reporting.scm: New tests.
|
|
|
|
|
|
|
|
|
| |
* Makefile.am
(E): New variable.
(nobase_dist_guilesite_DATA): Add .scmfrag files and protocols
.scmgen.
* gnu/gnunet/message/protocols.scm
(the-library-form): Search for files in %load-path.
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(estimate:logarithmic-number-peers,estimate:standard-deviation)
(estimate:number-peers): Remove resolved XXX.
(reconnect)[handlers]<msg:nse:estimate>{well-formed?}: Verify
'size-estimate' and 'std-deviation' fields.
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(reconnect)[error-handler]: Remove TODO about reconnecting.
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm (<server>)[estimate/box]:
Correct type in comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(<server>)[request-close-condition]: New field
(disconnect!): New procedure.
(reconnect): Add 'request-close-condition' argument.
(reconnect)[request-close-handler]: New procedure.
(reconnect): Spawn 'request-close-handler'.
(connect)[request-close-condition]: New variable.
(connect): Use new variable.
* tests/utils.scm: Export 'call-with-temporary-directory'.
* tests/network-size.scm
("close, not connected --> all fibers stop, no callbacks called"):
New test.
|
|
|
|
|
| |
* doc/scheme-gnunet.tm (Estimation of the size of the network):
Document that the module will retry after a disconnect.
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(reconnect): Extract from ...
(connect): ... here.
|
|
|
|
|
|
|
|
|
| |
This addresses a theoretical race condition.
* gnu/gnunet/nse/client.scm
(connect)[mq-defined]: New variable.
(connect)[error-handler]: Wait on new variable.
(connect)[mq]: Signal new condition after 'mq' is defined.
|
|
|
|
|
|
|
|
|
|
|
| |
These seemed like a good idea at the time, but eliminating
all OOM errors seems to be unrealistic now.
* gnu/gnunet/mq-impl/stream.scm
(handle-input!)[handle/message]: Remove TODO about allocating memory.
* gnu/gnunet/mq.scm
(inject-message!): Remove TODO about catching OOM and stack overflow
errors.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm
(handle-input!): Remove 'return' argument. Return errors from
'add-from-port!' instead of injecting them.
(prepare-port-message-queue)[start-reader!]: Remove #:return argument.
* tests/mq-stream.scm
(handle-input*): New procedure.
("messages + eof are injected in-order")
("overly small message is detected (--> stop)")
("premature eof is detected (--> stop)"): Use new procedure.
|
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(<server>): Remove 'mq', 'config', 'connected-callback',
'disconnected-callback' and 'estimate-update-callback'.
(estimate): Adjust call to constructor appropriately.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(connect): Add 'disconnected' optional keyword argument. Document
it.
(connect)[error-handler]: In case of input:regular-end-of-file and
input:premature-end-of-file, call 'disconnected'.
(<server>)[disconnected]: New field.
* tests/network-size.scm
("notify disconnected after end-of-file, after 'connected'"):
New test.
|
|
|
|
|
|
|
|
|
|
|
| |
The otherwise failing test will be added in the next commit.
* gnu/gnunet/mq-impl/stream.scm
(handle-input!): Handle ECONNRESET with a input:regular-end-of-file
error.
(handle-input!)[return/thunked]: New procedure.
(handle-input!)[return/overly-small,return/premature-eof,return/done-eof]:
Thunk.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm
(connect/fibers): Document new behaviour.
(connect/fibers)[interrupt-condition]: New variable.
(connect/fibers)[close*!]: New procedure.
(connect/fibers)[mq]: Use new procedure.
(connect/fibers)[allow-interrupt-operation]: New variable.
(connect/fibers)[sleep*]: New procedure.
(connect/fibers): Pass new 'sleep*' procedure to 'connect-unix'.
(connect/fibers): Inject 'connection:interrupted' if appropriate
instead of 'connection:connected'.
(connect-unix): Add 'sleep' argument.
* doc/scheme-gnunet.tm (Disconnecting): New section.
* tests/mq-stream.scm
("can close while still connecting (--> interrupted)")
("can close after being connected (--> regular-end-of-file)"):
New tests.
* README.org (List of errors): Note existence of 'connectin:interrupted'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/mq.scm
(make-message-queue): Accept optional 'closer' argument.
(close-queue!): New procedure.
* gnu/gnunet/mq-impl/stream.scm
(prepare-port-message-queue): Remove fixed TODO. Also return
'close!'.
(prepare-port-message-queue)[request-close-condition]: New variable.
(prepare-port-message-queue)[start-reader!]{wait-op}: Wait on
request-close-condition and escape.
(prepare-port-message-queue)[close!]: New procedure.
(port->message-queue): Accept 'close!' from
'prepare-port-message-queue'. Pass it to the message queue
constructor.
(connect/fibers): Accept 'close!' from
'prepare-port-message-queue'. Pass it to 'make-message-queue'.
Note a TODO.
* tests/mq-stream.scm
("fibers stop and port closed after close! (directly after creation)")
("fibers stop and port closed after close! (some times passes)"):
New tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm
(prepare-port-message-queue)[closed-condition]: Document new uses.
(prepare-port-message-queue)[start-reader!]: Close port if
signal-condition! returns #false.
(prepare-port-message-queue)[start-writer!]: Likewise.
* tests/mq-stream.scm
(%false-if-broken-pipe): New procedure.
(false-if-broken-pipe): New macro.
("closed for writing --> handle-input! stops (port->message-queue)"):
Adjust test to resource leak fix.
(error-handler/regular): New procedure.
("port is closed at input eof")
("port is closed at output eof")
("port is closed at input/output eof"): New tests.
|
|
|
|
|
|
|
| |
It doesn't seem like these TODOs are going to happen.
* gnu/gnunet/mq.scm (&missing-header-error, &size-mismatch-error):
Remove TODOs.
|
|
|
|
|
|
|
|
| |
* README.org (List of errors): Document logic:ill-formed.
* doc/scheme-gnunet.tm (logic:ill-formed): New explanation.
* gnu/gnunet/mq.scm (inject-message!): Document logic:ill-formed
error. Inject that error when the verificator returns falsehood.
* tests/mq.scm ("ill-formed message error"): New test.
|
|
|
|
|
|
|
| |
It's pretty usable now, though there's still some stuff to do.
* README.org (Message queues): Remove TODOs.
* gnu/gnunet/mq.scm: Remove TODOs. Add TODO about closing ports.
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm
(connect/fibers): Use 'prepare-port-message-queue'.
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm
(prepare-port-message-queue): Remove 'port' argument.
(prepare-port-message-queue)[start-reader!,start-writer!]:
Add 'port' argument'
(port->message-queue): Adjust caller.
|
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm (port->message-queue): Extract most
code to ...
(prepare-port-message-queue): ... this new procedure.
|
|
|
|
|
|
|
|
|
|
| |
This will make it simple to unify connect/fibers and
port->message-queue.
* gnu/gnunet/mq-impl/stream.scm
(port->message-queue)[start-reader!,start-writer!]: Add 'mq'
argument.
(port->message-queue)[mq]: Construct it just before calling 'spawn'.
|
|
|
|
|
|
|
|
|
|
| |
This makes writing changelog entries simpler,
and will be useful for unifying connect/fibers and
port->message-queue.
* gnu/gnunet/mq-impl/stream.scm
(port->message-queue)[start-reader!,start-writer!]:
Move arguments of 'spawn' to a named variable.
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/mq.scm (inject-message!): Inject logic:no-handler error
when the handler does not exist.
* tests/mq.scm ("no applicable message handler error"): New test.
* README.org (List of errors): Document it.
* doc/scheme-gnunet.tm (logic:no-handler): Likewise.
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm (connect)[handlers]: Use the
'message-handler' macro instead of the corresponding procedure.
|
|
|
|
|
| |
* gnu/gnunet/mq/handler.scm (message-handler): New macro.
* doc/scheme-gnunet.tm (Message handler): Partially document it.
|
|
|
|
|
|
|
|
|
| |
This doesn't fix anything, it just makes the previous code a little
less silly.
* gnu/gnunet/mq.scm
(inject-message!)[handler]: Use 'type' variable instead of reading
the type again.
|
|
|
|
|
| |
* gnu/gnunet/utils/hat-let.scm
(let^): Recognise (dotted) variable lists with <--.
|
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm
(handle-output!): Call 'force-output' after every 'send-round'.
* tests/mq-stream.scm ("output buffers are flushed"): New test.
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm
(port->message-queue): Document it in the write fiber.
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm
(port->message-queue): Interpose a 'current-write-waiter' that exits
when 'closed-condition' is signalled.
* tests/mq-stream.scm
(call-with-spawner/wait): New procedure.
("writer blocking and closed for reading --> all fibers stop"): New test.
|
|
|
|
|
|
|
|
| |
This doesn't seem to fix any bug, but it does make the code
seem clearer to me.
* gnu/gnunet/mq-impl/stream.scm (port->message-queue): Move error
injection outside 'let/ec'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/mq-impl/stream.scm
(handle-input!): Allow returning errors instead of injecting them.
Update documentation.
(handle-output!): Detect EPIPE.
(port->message-queue)[closed-condition]: Document what it is used
for.
(port->message-queue): Exit when the write fiber is done and the
read fiber is blocking. Only inject errors if the other fiber
hasn't done so already.
* tests/mq-stream.scm
("closed for writing --> handle-input!
stops (port->message-queue)"): New test.
|