X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=win%2Finspircd_namedpipe.cpp;h=93d7c423a1cbeb7690bebbf8674b7e9d23e72fd4;hb=819147178db00008a215670992d0f532dd57f9e5;hp=18ef9b9cb5805bdf7c9b653787b02b7418481204;hpb=097e19291f90bc35be8d307092435cd036e23dd2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/inspircd_namedpipe.cpp b/win/inspircd_namedpipe.cpp index 18ef9b9cb..93d7c423a 100644 --- a/win/inspircd_namedpipe.cpp +++ b/win/inspircd_namedpipe.cpp @@ -25,14 +25,14 @@ void IPCThread::Run() { Pipe = CreateNamedPipe (Pipename, PIPE_ACCESS_DUPLEX, // read/write access - PIPE_TYPE_MESSAGE | // message type pipe - PIPE_READMODE_MESSAGE | // message-read mode - PIPE_WAIT, // blocking mode - PIPE_UNLIMITED_INSTANCES, // max. instances - MAXBUF, // output buffer size - MAXBUF, // input buffer size - 1000, // client time-out - NULL); // no security attribute + PIPE_TYPE_MESSAGE | // message type pipe + PIPE_READMODE_MESSAGE | // message-read mode + PIPE_WAIT, // blocking mode + PIPE_UNLIMITED_INSTANCES, // max. instances + MAXBUF, // output buffer size + MAXBUF, // input buffer size + 1000, // client time-out + NULL); // no security attribute if (Pipe == INVALID_HANDLE_VALUE) { @@ -131,7 +131,7 @@ IPC::IPC(InspIRCd* Srv) : ServerInstance(Srv) { /* The IPC pipe is threaded */ thread = new IPCThread(Srv); - Srv->Threads->Create(thread); + Srv->Threads->Start(thread); } void IPC::Check() @@ -161,6 +161,12 @@ void IPC::Check() thread->ClearStatus(); ServerInstance->Restart("Restarting due to command from GUI"); break; + case '4': + /* Toggle debug */ + thread->SetResult(0); + thread->ClearStatus(); + ServerInstance->Config->forcedebug = !ServerInstance->Config->forcedebug; + break; } } @@ -168,4 +174,4 @@ IPC::~IPC() { thread->SetExitFlag(); delete thread; -} \ No newline at end of file +}