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); }