X-Git-Url: http://git.pk910.de/?p=NextIRCd.git;a=blobdiff_plain;f=src%2Fircd_sock.c;fp=src%2Fircd_sock.c;h=259c74b84a851806a8e740d9d1d2aabeb2d834e1;hp=a61686f5a22b089034b2b2d935f142e7b2d2fa62;hb=4e79b9632a41b2c7d2fecb4e4514692f9cf7e7f9;hpb=ffef7816a745964e42bbf7409975b127bb454152 diff --git a/src/ircd_sock.c b/src/ircd_sock.c index a61686f..259c74b 100644 --- a/src/ircd_sock.c +++ b/src/ircd_sock.c @@ -21,11 +21,14 @@ #include "ircd_parse.h" #include "ircd_auth.h" #include "struct_connection.h" +#include "struct_client.h" +#include "struct_auth.h" #include "IOHandler/IOSockets.h" #include #include +#include #include // @debug static struct Connection *sockets_listening = NULL; @@ -196,7 +199,6 @@ static IOSOCKET_CALLBACK(sockets_iohandler_callback) { // listening socket could not be opened } else { sockets_remove_list(connection); - client_disconnected(connection); sockets_free_connection(connection); } break; @@ -227,7 +229,7 @@ void socket_printf(struct Connection *conn, const char *text, ...) { va_start(arg_list, text); pos = vsnprintf(sendBuf, 512 - 2, text, arg_list); va_end(arg_list); - if (pos < 0 || pos > (512 - 2)) pos = CLIENT_MAXLEN - 2; + if (pos < 0 || pos > (512 - 2)) pos = 512 - 2; sendBuf[pos] = '\n'; sendBuf[pos+1] = '\0'; iosocket_send(conn->socket, sendBuf, pos+1);