]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - win/inspircd_namedpipe.cpp
Add and document <shun:enabledcommands>, allowing customisation of specifically which...
[user/henk/code/inspircd.git] / win / inspircd_namedpipe.cpp
index f86af73e23b6a48fafbd054ebdd0ff2f9be31ee3..a460f41a2b9d0627f4996dde3ca8793e715215ad 100644 (file)
@@ -8,7 +8,8 @@
 \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
@@ -23,19 +24,19 @@ void IPCThread::Run()
        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
-                       SleepEx(500, true);\r
+                       SleepEx(10, true);\r
                        continue;\r
                }\r
 \r
@@ -167,4 +168,4 @@ IPC::~IPC()
 {\r
        thread->SetExitFlag();\r
        delete thread;\r
-}
\ No newline at end of file
+}\r