summaryrefslogtreecommitdiff
path: root/src/filelogger.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-23 22:06:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-23 22:06:04 +0000
commitd0d36795e807cf72295c6e73813e0c2daa0a71e7 (patch)
tree09ae4d94ed7b6f3038d2579037fd2c7ee93a6657 /src/filelogger.cpp
parent61816ef0dd848225e9ec1c21c3c7a3bc03a34da9 (diff)
Craquity craq De-craq!
This is probably broken on windows, do not attempt to use there yet unless you like broken stuff. Cant say for sure as i havent even tried to build yet and most likely wont tonight. --- Abstract most of the berkely socket API out into SocketEngine derived classes. SocketEngine base class implements standard berkely sockets that 'real mens systems' like linux and freebsd have. For socketengine_iocp we implement the windows specific nonesense like the special things needed for udp and accept (ick). All this to eliminate a bunch of ifdefs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7810 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/filelogger.cpp')
-rw-r--r--src/filelogger.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/filelogger.cpp b/src/filelogger.cpp
index 244b62717..8bd28dde8 100644
--- a/src/filelogger.cpp
+++ b/src/filelogger.cpp
@@ -23,7 +23,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 +79,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());