interface.cpp and object.cpp now will only fill the interface names if they were left blank (João Xavier)

This commit is contained in:
pd 2008-08-16 16:09:11 +02:00
parent f0a9278511
commit 21ee9a5ef7
2 changed files with 11 additions and 4 deletions

View file

@ -70,7 +70,9 @@ void InterfaceAdaptor::emit_signal(const SignalMessage &sig)
{ {
SignalMessage &sig2 = const_cast<SignalMessage &>(sig); SignalMessage &sig2 = const_cast<SignalMessage &>(sig);
if (sig2.interface() == NULL)
sig2.interface(name().c_str()); sig2.interface(name().c_str());
_emit_signal(sig2); _emit_signal(sig2);
} }
@ -147,6 +149,8 @@ Message InterfaceProxy::invoke_method(const CallMessage &call)
{ {
CallMessage &call2 = const_cast<CallMessage &>(call); CallMessage &call2 = const_cast<CallMessage &>(call);
if (call.interface() == NULL)
call2.interface(name().c_str()); call2.interface(name().c_str());
return _invoke_method(call2); return _invoke_method(call2);
} }

View file

@ -320,7 +320,10 @@ void ObjectProxy::unregister_obj()
Message ObjectProxy::_invoke_method(CallMessage &call) Message ObjectProxy::_invoke_method(CallMessage &call)
{ {
if (call.path() == NULL)
call.path(path().c_str()); call.path(path().c_str());
if (call.destination() == NULL)
call.destination(service().c_str()); call.destination(service().c_str());
return conn().send_blocking(call); return conn().send_blocking(call);