X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Ffilelogger.cpp;h=32a1f882f00fdef76d95ec8339522862f1f68fd5;hb=4487dde76ffbdb21e7dc319b3b87d09c3cf60d8c;hp=244b627174ddf8064fdcdff7a2859383bd358544;hpb=a33663c08681c2c0ecedda478e1ae9953237b1aa;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/filelogger.cpp b/src/filelogger.cpp index 244b62717..32a1f882f 100644 --- a/src/filelogger.cpp +++ b/src/filelogger.cpp @@ -12,7 +12,6 @@ */ #include "inspircd.h" -#include #include #include "socketengine.h" #include "inspircd_se_config.h" @@ -23,7 +22,7 @@ FileLogger::FileLogger(InspIRCd* Instance, FILE* logfile) { if (log) { - irc::sockets::NonBlocking(fileno(log)); + Instance->SE->NonBlocking(fileno(log)); SetFd(fileno(log)); buffer.clear(); } @@ -79,13 +78,8 @@ void FileLogger::Close() { if (log) { - /* Burlex: Windows assumes nonblocking on FILE* pointers anyway, and also "file" fd's aren't the same - * as socket fd's. - */ -#ifndef WIN32 - int flags = fcntl(fileno(log), F_GETFL, 0); - fcntl(fileno(log), F_SETFL, flags ^ O_NONBLOCK); -#endif + ServerInstance->SE->Blocking(fileno(log)); + if (buffer.size()) fprintf(log,"%s",buffer.c_str());