]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - win/inspircd_namedpipe.cpp
Remove an extremely noisy piece of debug on startup/rehash - this code works fine...
[user/henk/code/inspircd.git] / win / inspircd_namedpipe.cpp
index 06649d103a6a453c4b08c3889791b85090de3d5f..36724366010575c741a3cc7e2702c8562e735f26 100644 (file)
@@ -25,18 +25,18 @@ void IPCThread::Run()
        {\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_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
@@ -161,6 +161,12 @@ void IPC::Check()
                        thread->ClearStatus();\r
                        ServerInstance->Restart("Restarting due to command from GUI");\r
                break;\r
+               case '4':\r
+                       /* Toggle debug */\r
+                       thread->SetResult(0);\r
+                       thread->ClearStatus();\r
+                       ServerInstance->Config->forcedebug = !ServerInstance->Config->forcedebug;\r
+               break;\r
        }\r
 }\r
 \r
@@ -168,4 +174,4 @@ IPC::~IPC()
 {\r
        thread->SetExitFlag();\r
        delete thread;\r
-}
\ No newline at end of file
+}\r