From 21ee9a5ef710250de587ba203f327338d3abbe77 Mon Sep 17 00:00:00 2001 From: pd Date: Sat, 16 Aug 2008 16:09:11 +0200 Subject: [PATCH] =?UTF-8?q?interface.cpp=20and=20object.cpp=20now=20will?= =?UTF-8?q?=20only=20fill=20the=20interface=20names=20if=20they=20were=20l?= =?UTF-8?q?eft=20blank=20(Jo=C3=A3o=20Xavier)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interface.cpp | 8 ++++++-- src/object.cpp | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/interface.cpp b/src/interface.cpp index 89a4573..6a47cf6 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -70,7 +70,9 @@ void InterfaceAdaptor::emit_signal(const SignalMessage &sig) { SignalMessage &sig2 = const_cast(sig); - sig2.interface(name().c_str()); + if (sig2.interface() == NULL) + sig2.interface(name().c_str()); + _emit_signal(sig2); } @@ -147,6 +149,8 @@ Message InterfaceProxy::invoke_method(const CallMessage &call) { CallMessage &call2 = const_cast(call); - call2.interface(name().c_str()); + if (call.interface() == NULL) + call2.interface(name().c_str()); + return _invoke_method(call2); } diff --git a/src/object.cpp b/src/object.cpp index 8bf22a8..970fcf7 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -320,8 +320,11 @@ void ObjectProxy::unregister_obj() Message ObjectProxy::_invoke_method(CallMessage &call) { - call.path(path().c_str()); - call.destination(service().c_str()); + if (call.path() == NULL) + call.path(path().c_str()); + + if (call.destination() == NULL) + call.destination(service().c_str()); return conn().send_blocking(call); }