1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 19:43:12 +02:00

Remove fatal_sockerror(), as nothing actually uses it.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2444 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
rburchell
2009-08-08 17:18:02 +00:00
parent eeb7c9c36d
commit d5cf78e6f7
-42
View File
@@ -292,45 +292,3 @@ void fatal_perror(const char *fmt, ...)
exit(1);
}
/*************************************************************************/
/* Same thing, but do it like perror().
* This is for socket errors. On *nix, it works just like fatal_perror,
* on Win32, it uses the socket error code and formatting functions.
*/
void fatal_sockerror(const char *fmt, ...)
{
va_list args;
char *buf;
char buf2[4096];
int errno_save = ano_sockgeterr();
if (!fmt) {
return;
}
checkday();
/* this will fix 581 */
va_start(args, fmt);
vsnprintf(buf2, sizeof(buf2), fmt, args);
va_end(args);
buf = log_gettimestamp();
if (logfile)
fprintf(logfile, "%s FATAL: %s: %s\n", buf, buf2,
ano_sockstrerror(errno_save));
if (stderr)
fprintf(stderr, "%s FATAL: %s: %s\n", buf, buf2,
ano_sockstrerror(errno_save));
if (servsock >= 0)
ircdproto->SendGlobops(NULL, "FATAL ERROR! %s: %s", buf2,
strerror(errno_save));
/* one of the many places this needs to be called from */
ModuleRunTimeDirCleanUp();
exit(1);
}