[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - binaryurp/source

2014-02-07 Thread Stephan Bergmann
 binaryurp/source/bridge.cxx |   16 
 binaryurp/source/reader.cxx |1 +
 binaryurp/source/writer.cxx |1 +
 3 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 5e161e9ee63377679fc57f33a216ca4707276700
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Feb 7 14:28:07 2014 +0100

fdo#56511 Don't unduly delay Bridge termination

When terminate is called from the Reader or Writer thread, the final 
terminate
was delayed until disposal of the BridgeFactory, as an unfortunate 
consequence
of always trying to join on the Reader and Writer.  Instead, forgo the join 
in
such a case and rely on the underlying osl::Thread becoming detached after
calling termiante.

Change-Id: Ifba788c4d0d2e9b14b4f7f6b5f0f1380b712ce36
(cherry picked from commit f6245d5bcb18dff2721d5975cd84711559cefe65)
Reviewed-on: https://gerrit.libreoffice.org/7919
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index cb69b0c..63cc9a7 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -255,10 +255,18 @@ void Bridge::terminate(bool final) {
 osl::MutexGuard g2(mutex_);
 tp = threadPool_;
 threadPool_ = 0;
-assert(!(reader_.is()  isThread(reader_.get(;
-std::swap(reader_, r);
-assert(!(writer_.is()  isThread(writer_.get(;
-std::swap(writer_, w);
+if (reader_.is()) {
+if (!isThread(reader_.get())) {
+r = reader_;
+}
+reader_.clear();
+}
+if (writer_.is()) {
+if (!isThread(writer_.get())) {
+w = writer_;
+}
+writer_.clear();
+}
 state_ = STATE_FINAL;
 }
 assert(!(r.is()  w.is()));
diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 184f037..331e4b3 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -128,6 +128,7 @@ void Reader::execute() {
 SAL_WARN(binaryurp, caught C++ exception '  e.what()  '\'');
 }
 bridge_-terminate(false);
+bridge_.clear();
 }
 
 void Reader::readMessage(Unmarshal  unmarshal) {
diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx
index 3d5c199..edcb0f5 100644
--- a/binaryurp/source/writer.cxx
+++ b/binaryurp/source/writer.cxx
@@ -177,6 +177,7 @@ void Writer::execute() {
 OSL_TRACE(OSL_LOG_PREFIX caught C++ exception '%s', e.what());
 }
 bridge_-terminate(false);
+bridge_.clear();
 }
 
 void Writer::sendRequest(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - binaryurp/source

2013-11-27 Thread Stephan Bergmann
 binaryurp/source/reader.cxx |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 6defaf61a9db438072372f95f5591c6db939
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Nov 27 14:49:22 2013 +0100

binaryurp: silently ignore superfluous MUSTREPLY/SYNCHRONOUS flags

...in a non-oneway call.  This can happen when a pre LO 4 entity is calling 
a
LO 4 entity post 90eac3e69749a9227c4b6902b1f3cef1e338c6d1
API CHANGE remove [oneway] method attributes.  (See mail thread starting 
at

http://mail-archives.apache.org/mod_mbox/openoffice-api/201311.mbox/%3Ca4e7f34d-b8cb-4d5a-890f-6894d3410265%40ucimail2.uci.cu%3E
hi, code in Java.)

Change-Id: I9f800a979d84a95cc5cd96f75ee7472e8cf6cf4b
(cherry picked from commit 289e54feabc936b8175327355a159073830a326a)

diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 522b165..184f037 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -238,12 +238,10 @@ void Reader::readMessage(Unmarshal  unmarshal) {
 {
 synchronous = forceSynchronous;
 } else {
-if (forceSynchronous) {
-throw css::uno::RuntimeException(
-(URP: synchronous request message with non-oneway function ID
-  received),
-css::uno::Reference css::uno::XInterface ());
-}
+SAL_INFO_IF(
+forceSynchronous, binaryurp,
+(superfluous MUSTREPLY/SYNCHRONOUS ignored in request message 
with
+  non-oneway function ID));
 synchronous = true;
 }
 bool setter = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits