Skip to content
Snippets Groups Projects
Commit 2c1e0b00 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

net.box: fix IO error messages

1. The net.box state machine is supposed to set E_NO_CONNECTION on
   error, but netbox_transport_connect returns an error returned by
   coio_connect and coio_read as is. Fix this.

2. netbox_transport_communicate sets the error message to
   strerror(errno) on coio_read or coio_write error. This works now,
   because iostream can only be backed by plain sockets, but once we
   implement encryption, errno won't make any sense. We should use
   error::errmsg instead.

3. While we are at it, fix luaT_netbox_transport_make_request: it's
   wrong to pass errmsg directly to box_error_raise - we should use a
   format specifier (%s).

Fixes commit c13b3a31 ("net.box: rewrite
state machine (transport) in C").
parent 29026b19
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment