* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
* ---------------------------------------------------
*/
+/* $Core: libIRCDfilelogger */
+
#include "inspircd.h"
-#include <sstream>
#include <fstream>
#include "socketengine.h"
#include "inspircd_se_config.h"
{
if (log)
{
- irc::sockets::NonBlocking(fileno(log));
+ Instance->SE->NonBlocking(fileno(log));
SetFd(fileno(log));
buffer.clear();
}
return false;
}
-void FileLogger::HandleEvent(EventType et, int errornum)
+void FileLogger::HandleEvent(EventType, int)
{
WriteLogLine("");
if (log)
{
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());