From d5cf78e6f7e8caafefb988b21c4fa0c140c60803 Mon Sep 17 00:00:00 2001 From: rburchell Date: Sat, 8 Aug 2009 17:18:02 +0000 Subject: [PATCH] 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 --- src/log.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/src/log.c b/src/log.c index 86dd286e6..8b5f935bf 100644 --- a/src/log.c +++ b/src/log.c @@ -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); -}