From 55a0b03f033d8309bd45d3cc3514bf3d36c9ffd0 Mon Sep 17 00:00:00 2001 From: stskeeps Date: Sat, 2 Sep 2000 07:48:52 +0000 Subject: [PATCH] . --- src/send.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/send.c b/src/send.c index bb2d0dc4d..6f234928f 100644 --- a/src/send.c +++ b/src/send.c @@ -87,7 +87,13 @@ static int dead_link(to, notice) DBufClear(&to->recvQ); DBufClear(&to->sendQ); if (!IsPerson(to) && !IsUnknown(to) && !(to->flags & FLAGS_CLOSING)) - (void)sendto_failops_whoare_opers(notice, get_client_name(to, FALSE)); + (void)sendto_failops_whoare_opers(notice, get_client_name(to, FALSE) +#ifndef _WIN32 + , strerror(errno) +#else + , strerror(WSAGetLastError()); +#endif + ); Debug((DEBUG_ERROR, notice, get_client_name(to, FALSE))); return -1; } @@ -167,7 +173,7 @@ int send_queued(to) msg = dbuf_map(&to->sendQ, &len); /* Returns always len > 0 */ if ((rlen = deliver_it(to, msg, len)) < 0) - return dead_link(to, "Write error to %s, closing link"); + return dead_link(to, "Write error to %s, closing link (%s)"); (void)dbuf_delete(&to->sendQ, rlen); to->lastsq = DBufLength(&to->sendQ) / 1024; if (rlen < len) @@ -203,6 +209,9 @@ void vsendto_one(aClient *to, char *pattern, va_list vl) void sendbufto_one(aClient *to) { int len; +#ifdef CRYPTOIRCD + char *s; +#endif Debug((DEBUG_ERROR, "Sending [%s] to %s", sendbuf, to->name));