test suite failure - more detail ...

Havoc Pennington hp at redhat.com
Sat Apr 17 14:23:58 EST 2004


On Fri, 2004-04-16 at 21:18, Olivier Andrieu wrote:
> Hmm, currently the client is not able to do this. There are four
> service-related signals: ServiceCreated, ServiceDeleted,
> ServiceAcquired and ServiceLost. The former two are broadcasted, the
> latter two are only directed to the concerned application.
> 
> When an owner change occurs, the former owner gets a ServiceLost
> signal, the new one a ServiceAcquired but the others apps on the bus
> are not signaled. So there is no owner change signal. Besides, these
> signals do not carry any information about the owner base service and
> that's what we need here.
> 
> The specification has a FIXME about this:
> ,----
> | instead of ServiceLost/ServiceCreated going only to a specific app,
> | why not just OwnerChanged that covers both lost and created and
> | changed owner and deleted
> `----
> 

This still seems sensible to me. ServiceCreated/ServiceDeleted I think
can definitely be replaced by OwnerChanged, and OwnerChanged could
definitely be used by other apps to see when a new owner appears.

I think we might still want ServiceAcquired and ServiceLost signals
going to the app that acquires or loses the service, it just seems a bit
cleaner to me on some level than strcmp() on the service in the
OwnerChanged. But at the same time, I'm not sure it's worth sending an
extra message unless we can come up with a better rationale than
"cleaner"

I imagine if you try to implement OwnerChanged you'd get a better feel
for the right approach.

> So maybe we could replace ServiceCreated/ServiceDeleted by a single
> signal, broadcasted, and carrying more information: 
> 
>  ServiceInfo (UINT32 flags, STRING service_name, STRING owner_base_service)
>  flags:
>    0x0 -> service created
>    0x1 -> owner changed
>    0x2 -> service deleted

I think it would be OK if rather than flags we had:
 service creation,   owner null -> new owner
 service deletion,   current owner -> owner null
 owner changed,      current owner -> new owner

i.e. you don't need the flags if you have both old and new owner in the
signal.

> Alternatively, we could add a field in ServiceCreated and add a new 
> signal:
> 
>  ServiceCreated      (STRING service_name, STRING owner_base_service)
>  ServiceDeleted      (STRING service_name)
>  ServiceOwnerChanged (STRING service_name, STRING new_owner_base_service)
> 
> ServiceAcquired and ServiceLost would stay as is.
> 
> Comments ?

To sum up what feels right to me is:
 OwnerChanged (STRING service_name, STRING_OR_NIL old_owner,
               STRING_OR_NIL new_owner)
 ServiceAcquired/ServiceLost as-is.

But I could very well have the wrong idea.

Havoc

 




More information about the dbus mailing list