\r
IPCThread::IPCThread(InspIRCd* Instance) : Thread(), ServerInstance(Instance)\r
{\r
- initwmi();\r
+ if (!initwmi())\r
+ ServerInstance->Logs->Log("IPC", DEBUG, "Could not initialise WMI. CPU percantage reports will not be available.");\r
}\r
\r
IPCThread::~IPCThread()\r
while (GetExitFlag() == false)\r
{\r
Pipe = CreateNamedPipe (Pipename,\r
- PIPE_ACCESS_DUPLEX, // read/write access\r
- PIPE_TYPE_MESSAGE | // message type pipe\r
- PIPE_READMODE_MESSAGE | // message-read mode\r
- PIPE_WAIT, // blocking mode\r
- PIPE_UNLIMITED_INSTANCES, // max. instances\r
- MAXBUF, // output buffer size\r
- MAXBUF, // input buffer size\r
- 1000, // client time-out\r
- NULL); // no security attribute\r
+ PIPE_ACCESS_DUPLEX, // read/write access\r
+ PIPE_TYPE_MESSAGE | // message type pipe\r
+ PIPE_READMODE_MESSAGE | // message-read mode\r
+ PIPE_WAIT, // blocking mode\r
+ PIPE_UNLIMITED_INSTANCES, // max. instances\r
+ MAXBUF, // output buffer size\r
+ MAXBUF, // input buffer size\r
+ 1000, // client time-out\r
+ NULL); // no security attribute\r
\r
if (Pipe == INVALID_HANDLE_VALUE)\r
{\r