Kaydet (Commit) 4495427e authored tarafından Caolán McNamara's avatar Caolán McNamara

experiment with renaming for bogus coverity#1371326 Misused comma operator

Change-Id: Idd2cc5e888c85a33c9d26aac26c48f3c74571724
üst 1b69b87f
...@@ -366,20 +366,20 @@ throw( RuntimeException, std::exception ) ...@@ -366,20 +366,20 @@ throw( RuntimeException, std::exception )
class IpcThread: public salhelper::Thread { class IpcThread: public salhelper::Thread {
public: public:
void start(RequestHandler * handler) { void start(RequestHandler * handler) {
handler_ = handler; m_handler = handler;
launch(); launch();
} }
virtual void close() = 0; virtual void close() = 0;
protected: protected:
explicit IpcThread(char const * name): Thread(name), handler_(nullptr) {} explicit IpcThread(char const * name): Thread(name), m_handler(nullptr) {}
virtual ~IpcThread() {} virtual ~IpcThread() {}
bool process(OString const & arguments, bool * waitProcessed); bool process(OString const & arguments, bool * waitProcessed);
RequestHandler * handler_; RequestHandler * m_handler;
}; };
class PipeIpcThread: public IpcThread { class PipeIpcThread: public IpcThread {
...@@ -561,12 +561,12 @@ RequestHandler::Status DbusIpcThread::enable(rtl::Reference<IpcThread> * thread) ...@@ -561,12 +561,12 @@ RequestHandler::Status DbusIpcThread::enable(rtl::Reference<IpcThread> * thread)
void DbusIpcThread::execute() void DbusIpcThread::execute()
{ {
assert(handler_ != nullptr); assert(m_handler != nullptr);
handler_->cReady.wait(); m_handler->cReady.wait();
for (;;) { for (;;) {
{ {
osl::MutexGuard g(RequestHandler::GetMutex()); osl::MutexGuard g(RequestHandler::GetMutex());
if (handler_->mState == RequestHandler::State::Downing) { if (m_handler->mState == RequestHandler::State::Downing) {
break; break;
} }
} }
...@@ -607,7 +607,7 @@ void DbusIpcThread::execute() ...@@ -607,7 +607,7 @@ void DbusIpcThread::execute()
} }
} }
if (waitProcessed) { if (waitProcessed) {
handler_->cProcessed.wait(); m_handler->cProcessed.wait();
} }
DbusMessageHolder repl(dbus_message_new_method_return(msg.message)); DbusMessageHolder repl(dbus_message_new_method_return(msg.message));
if (repl.message == nullptr) { if (repl.message == nullptr) {
...@@ -1038,8 +1038,8 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) { ...@@ -1038,8 +1038,8 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) {
ProcessDocumentsRequest* pRequest = new ProcessDocumentsRequest( ProcessDocumentsRequest* pRequest = new ProcessDocumentsRequest(
aCmdLineArgs->getCwdUrl()); aCmdLineArgs->getCwdUrl());
handler_->cProcessed.reset(); m_handler->cProcessed.reset();
pRequest->pcProcessed = &handler_->cProcessed; pRequest->pcProcessed = &m_handler->cProcessed;
// Print requests are not dependent on the --invisible cmdline argument as they are // Print requests are not dependent on the --invisible cmdline argument as they are
// loaded with the "hidden" flag! So they are always checked. // loaded with the "hidden" flag! So they are always checked.
...@@ -1186,7 +1186,7 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) { ...@@ -1186,7 +1186,7 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) {
void PipeIpcThread::execute() void PipeIpcThread::execute()
{ {
assert(handler_ != nullptr); assert(m_handler != nullptr);
do do
{ {
osl::StreamPipe aStreamPipe; osl::StreamPipe aStreamPipe;
...@@ -1199,16 +1199,16 @@ void PipeIpcThread::execute() ...@@ -1199,16 +1199,16 @@ void PipeIpcThread::execute()
// bootstrap, that dialogs event loop might get events that are dispatched by this thread // bootstrap, that dialogs event loop might get events that are dispatched by this thread
// we have to wait for cReady to be set by the real main loop. // we have to wait for cReady to be set by the real main loop.
// only requests that don't dispatch events may be processed before cReady is set. // only requests that don't dispatch events may be processed before cReady is set.
handler_->cReady.wait(); m_handler->cReady.wait();
// we might have decided to shutdown while we were sleeping // we might have decided to shutdown while we were sleeping
if (!handler_->pGlobal.is()) return; if (!m_handler->pGlobal.is()) return;
// only lock the mutex when processing starts, othewise we deadlock when the office goes // only lock the mutex when processing starts, othewise we deadlock when the office goes
// down during wait // down during wait
osl::ClearableMutexGuard aGuard( RequestHandler::GetMutex() ); osl::ClearableMutexGuard aGuard( RequestHandler::GetMutex() );
if ( handler_->mState == RequestHandler::State::Downing ) if (m_handler->mState == RequestHandler::State::Downing)
{ {
break; break;
} }
...@@ -1238,7 +1238,7 @@ void PipeIpcThread::execute() ...@@ -1238,7 +1238,7 @@ void PipeIpcThread::execute()
aGuard.clear(); aGuard.clear();
// wait for processing to finish // wait for processing to finish
if (waitProcessed) if (waitProcessed)
handler_->cProcessed.wait(); m_handler->cProcessed.wait();
// processing finished, inform the requesting end: // processing finished, inform the requesting end:
SAL_INFO("desktop.app", "writing <" << PROCESSING_DONE << ">"); SAL_INFO("desktop.app", "writing <" << PROCESSING_DONE << ">");
n = aStreamPipe.write( n = aStreamPipe.write(
...@@ -1253,7 +1253,7 @@ void PipeIpcThread::execute() ...@@ -1253,7 +1253,7 @@ void PipeIpcThread::execute()
{ {
{ {
osl::MutexGuard aGuard( RequestHandler::GetMutex() ); osl::MutexGuard aGuard( RequestHandler::GetMutex() );
if ( handler_->mState == RequestHandler::State::Downing ) if (m_handler->mState == RequestHandler::State::Downing)
{ {
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment