X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FServer.cpp;h=d4a2120b6ea5e3c0550b5348a59766971259898a;hb=c6f262a5b74e7bf595efd6a02ca26a2900e5e6eb;hp=8953c78dc34153b7d592bbc890dc5ccf44a7eb46;hpb=b498646b2eb880b420b493a94144dd8dce2e32c7;p=lyx.git diff --git a/src/Server.cpp b/src/Server.cpp index 8953c78dc3..d4a2120b6e 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -199,8 +199,8 @@ bool LyXComm::pipeServer() LYXERR(Debug::LYXSERVER, "LyXComm: Connection established"); ready_ = true; outbuf_.erase(); - DWORD status; - bool success; + DWORD status = 0; + bool success = false; while (!checkStopServer()) { // Indefinitely wait for the completion of an overlapped @@ -356,7 +356,7 @@ bool LyXComm::pipeServer() error = GetLastError(); - if (success && error == ERROR_IO_PENDING) { + if (success && (error == ERROR_IO_PENDING || error == NO_ERROR)) { // The write operation is still pending. // We get here when a reader is started // well before a reply is ready, so delay @@ -1178,7 +1178,7 @@ void Server::callback(string const & msg) // connect to the lyxfunc in the single GuiView we // support currently. (Lgb) - FuncRequest fr(lyxaction.lookupFunc(cmd), from_ascii(arg)); + FuncRequest fr(lyxaction.lookupFunc(cmd), from_utf8(arg)); fr.setOrigin(FuncRequest::LYXSERVER); DispatchResult dr; theApp()->dispatch(fr, dr);