From a5739325b657f59a8e7de48f785e8f9d9fe039f7 Mon Sep 17 00:00:00 2001 From: nohar Date: Mon, 23 May 2005 22:51:33 +0000 Subject: [PATCH] tonight, guinness is my inspiration --- src/connection.c | 1 + src/irc.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/connection.c b/src/connection.c index d79aa5f..c7e75ea 100644 --- a/src/connection.c +++ b/src/connection.c @@ -226,6 +226,7 @@ static int _write_socket(connection_t *cn, char *message) } } while (count < 0 && (errno == EAGAIN || errno == EINTR || errno == EINPROGRESS)); + if (count <= 0 && tcount > 0) fatal("shit happens errno:%d count:%d tcount:%d (%s)\n", errno, count, tcount, message); diff --git a/src/irc.c b/src/irc.c index 9451f26..6217e3c 100644 --- a/src/irc.c +++ b/src/irc.c @@ -1912,8 +1912,15 @@ void irc_main(connection_t *inc, list_t *ll) list_add_last(&reconnectl, link); if (link->l_clientc) { int i; - for (i = 0; i < link->l_clientc; i++) - list_add_last(&connl, CONN(link->l_clientv[i])); + for (i = 0; i < link->l_clientc; i++) { + struct link_client *c; + c = link->l_clientv[i]; + list_add_last(&connl, CONN(c)); + if (TYPE(c) == IRC_TYPE_LOGING_CLIENT) + list_add_last(&connecting_c, c); + if (TYPE(c) == IRC_TYPE_CLIENT) + list_add_last(&connected_c, c); + } } } if (conf_error && reloading_client) {