diff options
Diffstat (limited to 'src/socketengines')
-rw-r--r-- | src/socketengines/socketengine_epoll.cpp | 12 | ||||
-rw-r--r-- | src/socketengines/socketengine_iocp.cpp | 8 | ||||
-rw-r--r-- | src/socketengines/socketengine_kqueue.cpp | 8 | ||||
-rw-r--r-- | src/socketengines/socketengine_ports.cpp | 8 | ||||
-rw-r--r-- | src/socketengines/socketengine_select.cpp | 4 |
5 files changed, 20 insertions, 20 deletions
diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp index ccfa0f769..1a0c5d53e 100644 --- a/src/socketengines/socketengine_epoll.cpp +++ b/src/socketengines/socketengine_epoll.cpp @@ -22,8 +22,8 @@ EPollEngine::EPollEngine(InspIRCd* Instance) : SocketEngine(Instance) if (EngineHandle == -1) { - ServerInstance->Log(DEFAULT, "ERROR: Could not initialize socket engine: %s", strerror(errno)); - ServerInstance->Log(DEFAULT, "ERROR: Your kernel probably does not have the proper features. This is a fatal error, exiting now."); + ServerInstance->Logs->Log("SOCKET",DEFAULT, "ERROR: Could not initialize socket engine: %s", strerror(errno)); + ServerInstance->Logs->Log("SOCKET",DEFAULT, "ERROR: Your kernel probably does not have the proper features. This is a fatal error, exiting now."); printf("ERROR: Could not initialize socket engine: %s\n", strerror(errno)); printf("ERROR: Your kernel probably does not have the proper features. This is a fatal error, exiting now.\n"); ServerInstance->Exit(EXIT_STATUS_SOCKETENGINE); @@ -41,7 +41,7 @@ bool EPollEngine::AddFd(EventHandler* eh) int fd = eh->GetFd(); if ((fd < 0) || (fd > MAX_DESCRIPTORS)) { - ServerInstance->Log(DEBUG,"Out of range FD"); + ServerInstance->Logs->Log("SOCKET",DEBUG,"Out of range FD"); return false; } @@ -61,7 +61,7 @@ bool EPollEngine::AddFd(EventHandler* eh) return false; } - ServerInstance->Log(DEBUG,"New file descriptor: %d", fd); + ServerInstance->Logs->Log("SOCKET",DEBUG,"New file descriptor: %d", fd); ref[fd] = eh; CurrentSetSize++; @@ -94,14 +94,14 @@ bool EPollEngine::DelFd(EventHandler* eh, bool force) if (i < 0 && !force) { - ServerInstance->Log(DEBUG,"Cant remove socket: %s", strerror(errno)); + ServerInstance->Logs->Log("SOCKET",DEBUG,"Cant remove socket: %s", strerror(errno)); return false; } ref[fd] = NULL; CurrentSetSize--; - ServerInstance->Log(DEBUG,"Remove file descriptor: %d", fd); + ServerInstance->Logs->Log("SOCKET",DEBUG,"Remove file descriptor: %d", fd); return true; } diff --git a/src/socketengines/socketengine_iocp.cpp b/src/socketengines/socketengine_iocp.cpp index 9b7dd63c7..5bc1faed4 100644 --- a/src/socketengines/socketengine_iocp.cpp +++ b/src/socketengines/socketengine_iocp.cpp @@ -22,8 +22,8 @@ IOCPEngine::IOCPEngine(InspIRCd * Instance) : SocketEngine(Instance) if (!m_completionPort) { - ServerInstance->Log(DEFAULT, "ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features."); - ServerInstance->Log(DEFAULT, "ERROR: this is a fatal error, exiting now."); + ServerInstance->Logs->Log("SOCKET",DEFAULT, "ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features."); + ServerInstance->Logs->Log("SOCKET",DEFAULT, "ERROR: this is a fatal error, exiting now."); printf("ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features.\n"); printf("ERROR: this is a fatal error, exiting now.\n"); ServerInstance->Exit(EXIT_STATUS_SOCKETENGINE); @@ -84,7 +84,7 @@ bool IOCPEngine::AddFd(EventHandler* eh) PostReadEvent(eh); /* log message */ - ServerInstance->Log(DEBUG, "New fake fd: %u, real fd: %u, address 0x%p", *fake_fd, eh->GetFd(), eh); + ServerInstance->Logs->Log("SOCKET",DEBUG, "New fake fd: %u, real fd: %u, address 0x%p", *fake_fd, eh->GetFd(), eh); /* post a write event if there is data to be written */ if(eh->Writeable()) @@ -123,7 +123,7 @@ bool IOCPEngine::DelFd(EventHandler* eh, bool force /* = false */) void* m_writeEvent = NULL; void* m_acceptEvent = NULL; - ServerInstance->Log(DEBUG, "Removing fake fd %u, real fd %u, address 0x%p", *fake_fd, eh->GetFd(), eh); + ServerInstance->Logs->Log("SOCKET",DEBUG, "Removing fake fd %u, real fd %u, address 0x%p", *fake_fd, eh->GetFd(), eh); /* Cancel pending i/o operations. */ if (CancelIo((HANDLE)fd) == FALSE) diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp index a2bbd5afe..f245830de 100644 --- a/src/socketengines/socketengine_kqueue.cpp +++ b/src/socketengines/socketengine_kqueue.cpp @@ -34,8 +34,8 @@ void KQueueEngine::RecoverFromFork() EngineHandle = kqueue(); if (EngineHandle == -1) { - ServerInstance->Log(DEFAULT, "ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features."); - ServerInstance->Log(DEFAULT, "ERROR: this is a fatal error, exiting now."); + ServerInstance->Logs->Log("SOCKET",DEFAULT, "ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features."); + ServerInstance->Logs->Log("SOCKET",DEFAULT, "ERROR: this is a fatal error, exiting now."); printf("ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features.\n"); printf("ERROR: this is a fatal error, exiting now.\n"); ServerInstance->Exit(EXIT_STATUS_SOCKETENGINE); @@ -73,7 +73,7 @@ bool KQueueEngine::AddFd(EventHandler* eh) ref[fd] = eh; CurrentSetSize++; - ServerInstance->Log(DEBUG,"New file descriptor: %d", fd); + ServerInstance->Logs->Log("SOCKET",DEBUG,"New file descriptor: %d", fd); return true; } @@ -99,7 +99,7 @@ bool KQueueEngine::DelFd(EventHandler* eh, bool force) CurrentSetSize--; ref[fd] = NULL; - ServerInstance->Log(DEBUG,"Remove file descriptor: %d", fd); + ServerInstance->Logs->Log("SOCKET",DEBUG,"Remove file descriptor: %d", fd); return true; } diff --git a/src/socketengines/socketengine_ports.cpp b/src/socketengines/socketengine_ports.cpp index 0d97b91df..767ea0df0 100644 --- a/src/socketengines/socketengine_ports.cpp +++ b/src/socketengines/socketengine_ports.cpp @@ -22,8 +22,8 @@ PortsEngine::PortsEngine(InspIRCd* Instance) : SocketEngine(Instance) if (EngineHandle == -1) { - ServerInstance->Log(SPARSE,"ERROR: Could not initialize socket engine: %s", strerror(errno)); - ServerInstance->Log(SPARSE,"ERROR: This is a fatal error, exiting now."); + ServerInstance->Logs->Log("SOCKET",SPARSE,"ERROR: Could not initialize socket engine: %s", strerror(errno)); + ServerInstance->Logs->Log("SOCKET",SPARSE,"ERROR: This is a fatal error, exiting now."); printf("ERROR: Could not initialize socket engine: %s\n", strerror(errno)); printf("ERROR: This is a fatal error, exiting now.\n"); ServerInstance->Exit(EXIT_STATUS_SOCKETENGINE); @@ -51,7 +51,7 @@ bool PortsEngine::AddFd(EventHandler* eh) ref[fd] = eh; port_associate(EngineHandle, PORT_SOURCE_FD, fd, eh->Readable() ? POLLRDNORM : POLLWRNORM, eh); - ServerInstance->Log(DEBUG,"New file descriptor: %d", fd); + ServerInstance->Logs->Log("SOCKET",DEBUG,"New file descriptor: %d", fd); CurrentSetSize++; return true; } @@ -72,7 +72,7 @@ bool PortsEngine::DelFd(EventHandler* eh, bool force) CurrentSetSize--; ref[fd] = NULL; - ServerInstance->Log(DEBUG,"Remove file descriptor: %d", fd); + ServerInstance->Logs->Log("SOCKET",DEBUG,"Remove file descriptor: %d", fd); return true; } diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp index cc7232b99..8ee381877 100644 --- a/src/socketengines/socketengine_select.cpp +++ b/src/socketengines/socketengine_select.cpp @@ -45,7 +45,7 @@ bool SelectEngine::AddFd(EventHandler* eh) ref[fd] = eh; CurrentSetSize++; - ServerInstance->Log(DEBUG,"New file descriptor: %d", fd); + ServerInstance->Logs->Log("SOCKET",DEBUG,"New file descriptor: %d", fd); return true; } @@ -69,7 +69,7 @@ bool SelectEngine::DelFd(EventHandler* eh, bool force) ref[fd] = NULL; fds[fd] = 0; - ServerInstance->Log(DEBUG,"Remove file descriptor: %d", fd); + ServerInstance->Logs->Log("SOCKET",DEBUG,"Remove file descriptor: %d", fd); return true; } |