X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FServer.cpp;h=b89e834f20408275b6200ec6de2a3b9ff1367fef;hb=2de30c62f8d671a8c8d4d52a6a7310e2c5ca84de;hp=1de758a5f46bd1b9507c9e2ad9b213d9a015c550;hpb=6b2232a29c682d8e62d1d2b963bb1a70bee4330b;p=lyx.git diff --git a/src/Server.cpp b/src/Server.cpp index 1de758a5f4..b89e834f20 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -58,6 +58,8 @@ #include "support/bind.h" +#include + #ifdef _WIN32 #include #include @@ -136,7 +138,7 @@ DWORD WINAPI pipeServerWrapper(void * arg) LyXComm::LyXComm(string const & pip, Server * cli, ClientCallbackfct ccb) - : pipename_(pip), client_(cli), clientcb_(ccb), stopserver_(0) + : stopserver_(0), pipename_(pip), client_(cli), clientcb_(ccb) { for (int i = 0; i < MAX_PIPES; ++i) { event_[i] = 0; @@ -209,7 +211,7 @@ bool LyXComm::pipeServer() // Determine which pipe instance completed the operation. i = wait - WAIT_OBJECT_0; - LASSERT(i >= 0 && i <= MAX_PIPES, /**/); + LASSERT(i <= MAX_PIPES, /**/); // Check whether we were waked up for stopping the pipe server. if (i == MAX_PIPES) @@ -878,7 +880,7 @@ void LyXComm::endPipe(int & fd, string const & filename, bool write) << '\n' << strerror(errno) << endl; } - if (FileName(filename).removeFile() < 0) { + if (!FileName(filename).removeFile()) { lyxerr << "LyXComm: Could not remove pipe " << filename << '\n' << strerror(errno) << endl; } @@ -1173,7 +1175,7 @@ void Server::callback(string const & msg) // connect to the lyxfunc in the single GuiView we // support currently. (Lgb) - FuncRequest fr(lyxaction.lookupFunc(cmd), arg); + FuncRequest fr(lyxaction.lookupFunc(cmd), from_ascii(arg)); fr.setOrigin(FuncRequest::LYXSERVER); DispatchResult dr; theApp()->dispatch(fr, dr);