Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
4495427e
Kaydet (Commit)
4495427e
authored
Agu 18, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
experiment with renaming for bogus coverity#1371326 Misused comma operator
Change-Id: Idd2cc5e888c85a33c9d26aac26c48f3c74571724
üst
1b69b87f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
officeipcthread.cxx
desktop/source/app/officeipcthread.cxx
+15
-15
No files found.
desktop/source/app/officeipcthread.cxx
Dosyayı görüntüle @
4495427e
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment