1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-28 23:26:38 +02:00

- Renamed some calls from report_error() to report_baderror() since otherwise the errors are

hardly ever seen (unless you have +s +j set). For example a bad link::bind-ip only caused
  "Couldn't connect to xxxxxx" without any meaningful error message. Additionally, errors
  sent to report_baderror() are now logged.
^^ way too long description for a small tweak :p
This commit is contained in:
Bram Matthys
2004-11-17 17:38:54 +00:00
parent bc809fd7aa
commit cb6bfc4d34
2 changed files with 11 additions and 6 deletions
+4
View File
@@ -458,3 +458,7 @@
- Made typing /kline, /shun, /zline, and /gzline correctly report the correct /stats flag,
and these commands now produce the same output as the respective /stats flag they emulate
(#0002149) reported by Snake
- Renamed some calls from report_error() to report_baderror() since otherwise the errors are
hardly ever seen (unless you have +s +j set). For example a bad link::bind-ip only caused
"Couldn't connect to xxxxxx" without any meaningful error message. Additionally, errors
sent to report_baderror() are now logged.
+7 -6
View File
@@ -331,6 +331,7 @@ void report_baderror(char *text, aClient *cptr)
errtmp = err;
#endif
sendto_umode(UMODE_OPER, text, host, STRERROR(errtmp));
ircd_log(LOG_ERROR, text, host, STRERROR(errtmp));
return;
}
@@ -384,7 +385,7 @@ int inetport(aClient *cptr, char *name, int port)
{
#if !defined(DEBUGMODE) && !defined(_WIN32)
#endif
report_error("Cannot open stream socket() %s:%s", cptr);
report_baderror("Cannot open stream socket() %s:%s", cptr);
return -1;
}
else if (++OpenFiles >= MAXCLIENTS)
@@ -425,7 +426,7 @@ int inetport(aClient *cptr, char *name, int port)
ircsprintf(backupbuf, "Error binding stream socket to IP %s port %i",
ipname, port);
strlcat(backupbuf, " - %s:%s", sizeof backupbuf);
report_error(backupbuf, cptr);
report_baderror(backupbuf, cptr);
#if !defined(_WIN32) && defined(INET6)
/* Check if ipv4-over-ipv6 (::ffff:a.b.c.d, RFC2553
* section 3.7) is disabled, like at newer FreeBSD's. -- Syzop
@@ -1740,7 +1741,7 @@ int read_message(time_t delay, fdlist *listp)
return -1;
else if (nfds >= 0)
break;
report_error("select %s:%s", &me);
report_baderror("select %s:%s", &me);
res++;
if (res > 5)
restart("too many select errors");
@@ -1840,7 +1841,7 @@ int read_message(time_t delay, fdlist *listp)
if ((fd = accept(cptr->fd, NULL, NULL)) < 0)
{
if ((ERRNO != P_EWOULDBLOCK) && (ERRNO != P_ECONNABORTED))
report_error("Cannot accept connections %s:%s", cptr);
report_baderror("Cannot accept connections %s:%s", cptr);
break;
}
ircstp->is_ac++;
@@ -2492,7 +2493,7 @@ static struct SOCKADDR *connect_inet(ConfigItem_link *aconf, aClient *cptr, int
get_client_name(cptr, TRUE));
return NULL;
}
report_error("opening stream socket to server %s:%s", cptr);
report_baderror("opening stream socket to server %s:%s", cptr);
return NULL;
}
if (++OpenFiles >= MAXCLIENTS)
@@ -2518,7 +2519,7 @@ static struct SOCKADDR *connect_inet(ConfigItem_link *aconf, aClient *cptr, int
}
if (bind(cptr->fd, (struct SOCKADDR *)&server, sizeof(server)) == -1)
{
report_error("error binding to local port for %s:%s", cptr);
report_baderror("error binding to local port for %s:%s", cptr);
return NULL;
}
bzero((char *)&server, sizeof(server));