Commit 79d24a70 authored by Niels Möller's avatar Niels Möller

Adapted to the new werror function.

Rev: src/blowfish.c:1.3
Rev: src/channel.c:1.25
Rev: src/charset.c:1.5
Rev: src/charset.h:1.3
Rev: src/client.c:1.50
Rev: src/client_keyexchange.c:1.22
Rev: src/client_password.c:1.5
Rev: src/client_userauth.c:1.13
Rev: src/connection.c:1.24
Rev: src/debug.c:1.24
Rev: src/des.c:1.5
Rev: src/disconnect.c:1.13
Rev: src/format.h:1.18
Rev: src/gc.c:1.7
Rev: src/io.c:1.47
Rev: src/keyexchange.c:1.43
Rev: src/lsh.c:1.41
Rev: src/lsh_keygen.c:1.10
Rev: src/lsh_writekey.c:1.4
Rev: src/lshd.c:1.36
Rev: src/publickey_crypto.c:1.25
Rev: src/randomness.c:1.13
Rev: src/read_line.c:1.19
Rev: src/read_packet.c:1.31
Rev: src/reaper.c:1.9
Rev: src/server.c:1.42
Rev: src/server_keyexchange.c:1.22
Rev: src/server_password.c:1.13
Rev: src/server_pty.c:1.3
Rev: src/sexp_parser.c:1.6
Rev: src/sexp_streamed_parser.c:1.4
Rev: src/ssh1_fallback.c:1.3
Rev: src/tty.c:1.3
Rev: src/werror.h:1.14
Rev: src/xalloc.c:1.18
Rev: src/zlib.c:1.12
parent 22592f36
......@@ -75,7 +75,7 @@ make_blowfish_instance(struct crypto_algorithm *algorithm, int mode,
case 0:
return &self->super;
default:
wwrite("Detected a weak blowfish key!\n");
werror("Detected a weak blowfish key!\n");
KILL(self);
return NULL;
}
......
......@@ -393,7 +393,7 @@ static int do_channel_open(struct packet_handler *c,
if ( (local_channel_number
= register_channel(closure->super.table, channel)) < 0)
{
wwrite("Could not allocate a channel number for pened channel!\n");
werror("Could not allocate a channel number for pened channel!\n");
return A_WRITE(connection->write,
format_open_failure(remote_channel_number,
SSH_OPEN_RESOURCE_SHORTAGE,
......@@ -460,7 +460,7 @@ static int do_channel_request(struct packet_handler *c,
: LSH_OK | LSH_GOON;
}
werror("SSH_MSG_CHANNEL_REQUEST on nonexistant channel %d\n",
werror("SSH_MSG_CHANNEL_REQUEST on nonexistant channel %i\n",
channel_number);
return LSH_FAIL | LSH_DIE;
}
......@@ -509,7 +509,7 @@ static int do_window_adjust(struct packet_handler *c,
}
/* FIXME: What to do now? Should unknown channel numbers be
* ignored silently? */
werror("SSH_MSG_CHANNEL_WINDOW_ADJUST on nonexistant or closed channel %d\n",
werror("SSH_MSG_CHANNEL_WINDOW_ADJUST on nonexistant or closed channel %i\n",
channel_number);
return LSH_FAIL | LSH_DIE;
}
......@@ -547,7 +547,7 @@ static int do_channel_data(struct packet_handler *c,
{
if (channel->flags & CHANNEL_SENT_CLOSE)
{
wwrite("Ignoring data on channel which is closing\n");
werror("Ignoring data on channel which is closing\n");
return LSH_OK | LSH_GOON;
}
else
......@@ -557,7 +557,7 @@ static int do_channel_data(struct packet_handler *c,
if (data->length > channel->rec_window_size)
{
/* Truncate data to fit window */
wwrite("Channel data overflow. Extra data ignored.\n");
werror("Channel data overflow. Extra data ignored.\n");
data->length = channel->rec_window_size;
}
......@@ -589,7 +589,7 @@ static int do_channel_data(struct packet_handler *c,
return LSH_OK | LSH_GOON;
}
werror("Data on closed or non-existant channel %d\n",
werror("Data on closed or non-existant channel %i\n",
channel_number);
lsh_string_free(data);
return LSH_FAIL | LSH_DIE;
......@@ -630,7 +630,7 @@ static int do_channel_extended_data(struct packet_handler *c,
{
if (channel->flags & CHANNEL_SENT_CLOSE)
{
wwrite("Ignoring extended data on channel which is closing\n");
werror("Ignoring extended data on channel which is closing\n");
return LSH_OK | LSH_GOON;
}
else
......@@ -640,7 +640,7 @@ static int do_channel_extended_data(struct packet_handler *c,
if (data->length > channel->rec_window_size)
{
/* Truncate data to fit window */
wwrite("Channel extended data overflow. "
werror("Channel extended data overflow. "
"Extra data ignored.\n");
data->length = channel->rec_window_size;
}
......@@ -664,14 +664,14 @@ static int do_channel_extended_data(struct packet_handler *c,
res | CHANNEL_RECEIVE(channel,
CHANNEL_STDERR_DATA, data));
default:
werror("Unknown type %d of extended data.\n",
werror("Unknown type %i of extended data.\n",
type);
lsh_string_free(data);
return LSH_FAIL | LSH_DIE;
}
}
}
werror("Extended data on closed or non-existant channel %d\n",
werror("Extended data on closed or non-existant channel %i\n",
channel_number);
lsh_string_free(data);
return LSH_FAIL | LSH_DIE;
......@@ -709,7 +709,7 @@ static int do_channel_eof(struct packet_handler *c,
if (channel->flags & (CHANNEL_RECEIVED_EOF | CHANNEL_RECEIVED_CLOSE))
{
wwrite("Receiving EOF on channel on closed channel.\n");
werror("Receiving EOF on channel on closed channel.\n");
return LSH_FAIL | LSH_DIE;
}
......@@ -737,7 +737,7 @@ static int do_channel_eof(struct packet_handler *c,
res);
}
werror("EOF on non-existant channel %d\n",
werror("EOF on non-existant channel %i\n",
channel_number);
return LSH_FAIL | LSH_DIE;
}
......@@ -774,7 +774,7 @@ static int do_channel_close(struct packet_handler *c,
if (channel->flags & CHANNEL_RECEIVED_CLOSE)
{
wwrite("Receiving multiple CLOSE on channel.\n");
werror("Receiving multiple CLOSE on channel.\n");
return LSH_FAIL | LSH_DIE;
}
......@@ -782,7 +782,7 @@ static int do_channel_close(struct packet_handler *c,
if (! (channel->flags & (CHANNEL_RECEIVED_EOF | CHANNEL_SENT_EOF)))
{
wwrite("Unexpected channel CLOSE.\n");
werror("Unexpected channel CLOSE.\n");
}
if (! (channel->flags & (CHANNEL_RECEIVED_EOF))
......@@ -796,7 +796,7 @@ static int do_channel_close(struct packet_handler *c,
: channel_close(channel))
| res));
}
werror("CLOSE on non-existant channel %d\n",
werror("CLOSE on non-existant channel %i\n",
channel_number);
return LSH_FAIL | LSH_DIE;
......@@ -842,7 +842,7 @@ static int do_channel_open_confirm(struct packet_handler *c,
return channel_process_status(closure->table, local_channel_number,
CHANNEL_OPEN_CONFIRM(channel));
}
werror("Unexpected SSH_MSG_CHANNEL_OPEN_CONFIRMATION on channel %d\n",
werror("Unexpected SSH_MSG_CHANNEL_OPEN_CONFIRMATION on channel %i\n",
local_channel_number);
return LSH_FAIL | LSH_DIE;
}
......@@ -891,7 +891,7 @@ static int do_channel_open_failure(struct packet_handler *c,
return channel_process_status(closure->table, channel_number,
res | LSH_CHANNEL_FINISHED);
}
werror("Unexpected SSH_MSG_CHANNEL_OPEN_FAILURE on channel %d\n",
werror("Unexpected SSH_MSG_CHANNEL_OPEN_FAILURE on channel %i\n",
channel_number);
lsh_string_free(packet);
......@@ -1254,7 +1254,7 @@ static int channel_close_callback(struct close_callback *c, int reason)
channel_close(closure->channel);
break;
default:
fatal("channel_close_callback: Unexpected close reason %d!\n",
fatal("channel_close_callback: Unexpected close reason %i!\n",
reason);
}
/* FIXME: So far, the returned value is ignored. */
......
......@@ -26,6 +26,7 @@
#include "charset.h"
#include "format.h" /* For lsh_string_dup() */
#include "parse.h"
#include "werror.h"
#include "xalloc.h"
......@@ -144,21 +145,21 @@ struct lsh_string *local_to_utf8(struct lsh_string *s, int free)
}
}
}
struct lsh_string *utf8_to_local(struct lsh_string *s, int free)
int local_is_utf8(void) { return (local_charset == CHARSET_UTF8); }
struct lsh_string *low_utf8_to_local(UINT32 length, UINT8 *s, int strict)
{
UINT32 i;
struct lsh_string *res;
struct simple_buffer buffer;
if (local_charset == CHARSET_UTF8)
return s;
assert(!local_is_utf8());
/* The string can't grow when converted to local charset */
res = lsh_string_alloc(s->length);
res = lsh_string_alloc(length);
simple_buffer_init(&buffer, s->length, s->data);
simple_buffer_init(&buffer, length, s);
for (i = 0; 1; i++)
{
......@@ -170,8 +171,6 @@ struct lsh_string *utf8_to_local(struct lsh_string *s, int free)
assert(i<=res->length);
res->length = i;
if (free)
lsh_string_free(s);
return res;
......@@ -184,16 +183,37 @@ struct lsh_string *utf8_to_local(struct lsh_string *s, int free)
res->data[i] = local;
break;
}
else if (!strict)
{
/* Replace unkonwn characters. */
res->data[i] = '?';
break;
}
/* Fall through */
}
case 0: /* Error */
lsh_string_free(res);
if (free)
lsh_string_free(s);
return 0;
return NULL;
default:
fatal("Internal error!\n");
}
}
}
struct lsh_string *utf8_to_local(struct lsh_string *s, int strict, int free)
{
struct lsh_string *res;
if (local_is_utf8())
return free ? s : lsh_string_dup(s);
res = low_utf8_to_local(s->length, s->data, strict);
if (free)
lsh_string_free(s);
return res;
}
......@@ -41,6 +41,13 @@ UINT32 local_to_ucs4(int c);
int ucs4_to_local(UINT32 c);
struct lsh_string *local_to_utf8(struct lsh_string *s, int free);
struct lsh_string *utf8_to_local(struct lsh_string *s, int free);
/* Returns NULL if the UTF-8 encoding is invalid. If STRICT, it
* returns NULL also if the UTF-8 is valid but not representable in
* the local charset. If not STRICT, non-representably charecters are
* replaced with '?'. */
struct lsh_string *utf8_to_local(struct lsh_string *s, int strict, int free);
struct lsh_string *low_utf8_to_local(UINT32 length, UINT8 *s, int strict);
int local_is_utf8(void);
#endif /* LSH_CHARSET_H_INCLUDED */
......@@ -135,13 +135,12 @@ static int do_line(struct line_handler **h,
closure->connection->server_version
= ssh_format("%ls", length, line);
verbose("Client version: ");
verbose_safe(closure->connection->client_version->length,
closure->connection->client_version->data);
verbose("\nServer version: ");
verbose_safe(closure->connection->server_version->length,
closure->connection->server_version->data);
verbose("\n");
verbose("Client version: %ps\n"
"Server version: %ps\n",
closure->connection->client_version->length,
closure->connection->client_version->data,
closure->connection->server_version->length,
closure->connection->server_version->data);
/* FIXME: Cleanup properly. */
KILL(closure);
......@@ -151,9 +150,8 @@ static int do_line(struct line_handler **h,
}
else
{
wwrite("Unsupported protocol version: ");
werror_safe(length, line);
wwrite("\n");
werror("Unsupported protocol version: %ps\n",
length, line);
/* FIXME: Clean up properly */
KILL(closure);
......@@ -165,7 +163,7 @@ static int do_line(struct line_handler **h,
else
{
/* Display line */
werror_safe(length, line);
werror("%ps\n", length, line);
/* Read next line */
return LSH_OK | LSH_GOON;
......@@ -208,9 +206,9 @@ make_client_callback(struct io_backend *b,
static int client_close_die(struct close_callback *closure UNUSED,
int reason)
{
verbose("Connection died, for reason %d.\n", reason);
verbose("Connection died, for reason %i.\n", reason);
if (reason != CLOSE_EOF)
wwrite("Connection died.\n");
werror("Connection died.\n");
/* FIXME: Return value is not used. */
return 4711;
......@@ -447,11 +445,10 @@ static int do_exit_signal(struct channel_request *c,
signal = signal_network_to_local(signal);
werror_utf8(length, msg);
werror("Remote process was killed by %s.\n",
signal ? strsignal(signal) : "an unknown signal");
if (core)
wwrite("(core dumped remotely)\n");
werror("%us", length, msg);
werror("Remote process was killed by %z.%z\n",
signal ? strsignal(signal) : "an unknown signal",
core ? "(core dumped remotely)\n": "");
ALIST_SET(channel->request_types, ATOM_EXIT_STATUS, NULL);
ALIST_SET(channel->request_types, ATOM_EXIT_SIGNAL, NULL);
......@@ -814,7 +811,7 @@ static int do_pty_result(struct request_info *r,
{
CAST(pty_request, req, r);
verbose("lsh: pty request %s.\n", res ? "successful" : "failed");
verbose("lsh: pty request %z.\n", res ? "successful" : "failed");
if (res)
{
......
......@@ -111,7 +111,7 @@ static int do_handle_dh_reply(struct packet_handler *c,
if (!INSTALL_KEYS(closure->install, connection, hash))
{
wwrite("Installing new keys failed. Hanging up.\n");
werror("Installing new keys failed. Hanging up.\n");
KILL(hash);
/* FIXME: Send a disconnect message */
return LSH_FAIL | LSH_DIE;
......
......@@ -69,7 +69,7 @@ static int echo_on(int fd)
if (tcgetattr(fd, &t) < 0)
{
werror("Can't get terminal attributes: %s\n", strerror(errno));
werror("Can't get terminal attributes: %z\n", strerror(errno));
return 0;
}
......@@ -77,7 +77,7 @@ static int echo_on(int fd)
if (tcsetattr(fd, TCSANOW, &t) < 0)
{
werror("Can't set terminal attributes: %s\n", strerror(errno));
werror("Can't set terminal attributes: %z\n", strerror(errno));
return 0;
}
......@@ -90,7 +90,7 @@ static int echo_off(int fd)
if (tcgetattr(fd, &t) < 0)
{
werror("Can't get terminal attributes: %s\n", strerror(errno));
werror("Can't get terminal attributes: %z\n", strerror(errno));
return 0;
}
......@@ -98,7 +98,7 @@ static int echo_off(int fd)
if (tcsetattr(fd, TCSAFLUSH, &t) < 0)
{
werror("Can't set terminal attributes: %s\n", strerror(errno));
werror("Can't set terminal attributes: %z\n", strerror(errno));
return 0;
}
......@@ -117,14 +117,14 @@ struct lsh_string *read_password(int max_length, struct lsh_string *prompt)
if (fd < 0)
{
werror("Can't open /dev/tty: %s\n", strerror(errno));
werror("Can't open /dev/tty: %z\n", strerror(errno));
return 0;
}
tty = fdopen(fd, "rw");
if (!tty)
{
close(fd);
werror("Can't fdopen /dev/tty: %s\n", strerror(errno));
werror("Can't fdopen /dev/tty: %z\n", strerror(errno));
return 0;
}
......
......@@ -132,7 +132,7 @@ static int do_userauth_success(struct packet_handler *c,
&& (msg_number == SSH_MSG_USERAUTH_SUCCESS)
&& parse_eod(&buffer))
{
wwrite("User authentication successful.\n");
werror("User authentication successful.\n");
lsh_string_free(packet);
......@@ -175,7 +175,7 @@ static int do_userauth_failure(struct packet_handler *c,
if (partial_success)
{ /* Doesn't help us */
wwrite("Received SSH_MSH_USERAUTH_FAILURE "
werror("Received SSH_MSH_USERAUTH_FAILURE "
"indicating partial success.\n");
KILL(methods);
......@@ -224,7 +224,7 @@ static int do_userauth_banner(struct packet_handler *closure,
&& parse_eod(&buffer))
{
/* Ignore language tag */
werror_utf8(length, msg);
werror("%us", length, msg);
lsh_string_free(packet);
return LSH_OK | LSH_GOON;
......
......@@ -47,26 +47,26 @@ static int handle_connection(struct abstract_write *w,
if (!packet->length)
{
wwrite("connection.c: Received empty packet!\n");
werror("connection.c: Received empty packet!\n");
return LSH_FAIL | LSH_DIE;
}
msg = packet->data[0];
debug("handle_connection: Received packet of type %d\n", msg);
debug("handle_connection: Received packet of type %i\n", msg);
switch(closure->kex_state)
{
case KEX_STATE_INIT:
if (msg == SSH_MSG_NEWKEYS)
{
wwrite("Unexpected NEWKEYS message!\n");
werror("Unexpected NEWKEYS message!\n");
lsh_string_free(packet);
return LSH_FAIL | LSH_DIE;
}
break;
case KEX_STATE_IGNORE:
debug("handle_connection: Ignoring packet %d\n", msg);
debug("handle_connection: Ignoring packet %i\n", msg);
/* It's concievable with key exchange methods for which one
* wants to switch to the NEWKEYS state immediately. But for
......@@ -80,7 +80,7 @@ static int handle_connection(struct abstract_write *w,
if ( (msg == SSH_MSG_NEWKEYS)
|| (msg == SSH_MSG_KEXINIT))
{
wwrite("Unexpected KEXINIT or NEWKEYS message!\n");
werror("Unexpected KEXINIT or NEWKEYS message!\n");
lsh_string_free(packet);
return LSH_FAIL | LSH_DIE;
}
......@@ -89,7 +89,7 @@ static int handle_connection(struct abstract_write *w,
if ( (msg != SSH_MSG_NEWKEYS)
&& (msg != SSH_MSG_DISCONNECT) )
{
werror("Expected NEWKEYS message, but received message %d!\n",
werror("Expected NEWKEYS message, but received message %i!\n",
msg);
lsh_string_free(packet);
return LSH_FAIL | LSH_DIE;
......@@ -131,7 +131,7 @@ static int do_unimplemented(struct packet_handler *closure,
ssh_format("%c%i",
SSH_MSG_UNIMPLEMENTED,
packet->sequence_number));
verbose("Received packet of unimplemented type %d.\n",
verbose("Received packet of unimplemented type %i.\n",
packet->data[0]);
lsh_string_free(packet);
......
......@@ -47,9 +47,7 @@ static int do_debug(struct abstract_write *w,
{
CAST(packet_debug, closure, w);
debug("DEBUG: received packet");
debug_hex(packet->length, packet->data);
debug("\n");
debug("DEBUG: received packet %xS\n", packet);
return A_WRITE(closure->super.next, packet);
}
......@@ -116,17 +114,10 @@ static int do_rec_debug(struct packet_handler *self UNUSED,
}
if (always_display)
{
wwrite("Received debug: ");
werror_utf8(length, msg);
wwrite("\n");
}
werror("Received debug: %ups\n", length, msg);
else
{
verbose("Received debug: ");
verbose_utf8(length, msg);
verbose("\n");
}
verbose("Received debug: %ups\n", length, msg);
lsh_string_free(packet);
return LSH_OK | LSH_GOON;
......
......@@ -88,7 +88,7 @@ make_des_instance(struct crypto_algorithm *algorithm UNUSED, int mode,
case -1:
fatal("Internal error! Bad parity in make_des_instance.\n");
case -2:
wwrite("Detected weak DES key.\n");
werror("Detected weak DES key.\n");
KILL(self);
return NULL;
default:
......
......@@ -58,11 +58,11 @@ static int do_disconnect(struct packet_handler *closure UNUSED,
/* FIXME: Language tag is ignored */ )
{
/* FIXME: Display a better message */
werror("Disconnect for reason %d\n", reason);
werror_utf8(length, msg);
werror("Disconnect for reason %i\n%ups\n", reason, length, msg);
}
else
wwrite("Invalid disconnect message!\n");
werror("Invalid disconnect message!\n");
lsh_string_free(packet);
/* FIXME: Mark the file as closed, somehow (probably a variable in
......
......@@ -85,4 +85,6 @@ void ssh_vformat_write(const char *format, UINT32 length, UINT8 *buffer, va_list
struct lsh_string *format_cstring(const char *s);
struct lsh_string *make_cstring(struct lsh_string *s, int free);
unsigned format_size_in_decimal(UINT32 n);
#endif /* LSH_FORMAT_H_INCLUDED */
......@@ -48,14 +48,14 @@ static void sanity_check_object_list(void)
#if 0
wwrite("sanity_check_object_list: Objects on list:\n");
for(o = all_objects; o; o = o->next)
werror(" %p, class: %s\n", (void *) o, o->isa ? o->isa->name : "UNKNOWN");
werror(" %xi, class: %z\n", (UINT32) o, o->isa ? o->isa->name : "UNKNOWN");
#endif
for(o = all_objects; o; o = o->next)
i++;
if (i != number_of_objects)
fatal("sanity_check_object_list: Found %d objects, expected %d.\n",
fatal("sanity_check_object_list: Found %i objects, expected %i.\n",
i, number_of_objects);
}
#endif
......@@ -87,7 +87,7 @@ static void gc_mark(struct lsh_object *o)
struct lsh_class *class;
#if 0
debug("gc_mark: Marking object of class '%s'\n",
debug("gc_mark: Marking object of class '%z'\n",
o->isa ? o->isa->name : "UNKNOWN");
#endif
......@@ -123,7 +123,7 @@ static void gc_sweep(void)
struct lsh_class *class;
#if 0
debug("gc_sweep: Freeing object of class '%s'\n",
debug("gc_sweep: Freeing object of class '%z'\n",
o->isa->name);
#endif
for (class = o->isa; class; class = class->super_class)
......@@ -204,7 +204,7 @@ void gc(struct lsh_object *root)
gc_mark(root);
gc_sweep();
verbose("Objects alive: %d, garbage collected: %d\n", live_objects,
verbose("Objects alive: %i, garbage collected: %i\n", live_objects,
before - live_objects);
}
......@@ -216,7 +216,7 @@ void gc_maybe(struct lsh_object *root, int busy)
if (number_of_objects > (100 + live_objects*(2+busy)))
{
verbose("Garbage collecting while %s...\n", busy ? "busy" : "idle");
verbose("Garbage collecting while %z...\n", busy ? "busy" : "idle");
gc(root);
}
}
......@@ -102,7 +102,7 @@ int io_iter(struct io_backend *b)
if (fd->close_callback && fd->close_reason)
(void) CLOSE_CALLBACK(fd->close_callback, fd->close_reason);
debug("Closing fd %d.\n", fd->fd);
debug("Closing fd %i.\n", fd->fd);
close(fd->fd);
}
......@@ -177,7 +177,7 @@ int io_iter(struct io_backend *b)
case EINTR:
return 1;
default:
fatal("io_iter: poll failed: %s", strerror(errno));
fatal("io_iter: poll failed: %z", strerror(errno));
}
{
......@@ -226,7 +226,7 @@ static int do_read(struct abstract_read **r, UINT32 length, UINT8 *buffer)
int res = read(closure->fd, buffer, length);
if (!res)
{
debug("Read EOF on fd %d.\n", closure->fd);
debug("Read EOF on fd %i.\n", closure->fd);
return A_EOF;
}
if (res > 0)
......@@ -240,12 +240,12 @@ static int do_read(struct abstract_read **r, UINT32 length, UINT8 *buffer)
case EWOULDBLOCK: /* aka EAGAIN */
return 0;
case EPIPE:
wwrite("io.c: read() returned EPIPE! Treating it as EOF.\n");
werror("io.c: read() returned EPIPE! Treating it as EOF.\n");
return A_EOF;
default:
werror("io.c: do_read: read() failed (errno %d), %s\n",
werror("io.c: do_read: read() failed (errno %i), %z\n",
errno, strerror(errno));
debug(" fd = %d, buffer = %p, length = %ud\n",
debug(" fd = %i, buffer = %xi, length = %i\n",
closure->fd, buffer, length);
return A_FAIL;
}
......@@ -334,7 +334,7 @@ static void write_callback(struct lsh_fd *fd)
close_fd(fd, CLOSE_BROKEN_PIPE);
break;
default:
werror("io.c: write failed, %s\n", strerror(errno));
werror("io.c: write failed, %z\n", strerror(errno));
close_fd(fd, CLOSE_WRITE_FAILED);
......@@ -358,13 +358,13 @@ static void listen_callback(struct lsh_fd *fd)
(struct sockaddr *) &peer, &addr_len);
if (conn < 0)
{
werror("io.c: accept() failed, %s", strerror(errno));
werror("io.c: accept() failed, %z", strerror(errno));
return;
}
res = FD_CALLBACK(self->callback, conn);
if (LSH_ACTIONP(res))
{
wwrite("Strange: Accepted a connection, "
werror("Strange: Accepted a connection, "