Hi Tim,

> > > This patch corrects the interface so that the "net.connman.Clock"
> > > interface accepts variant types as advertised in introspection.
> > > 
> > > diff --git a/src/clock.c b/src/clock.c
> > > index 0d7f870..30bcc0e 100644
> > > --- a/src/clock.c
> > > +++ b/src/clock.c
> > > @@ -179,6 +179,11 @@ static DBusMessage *set_property(DBusConnection
> > > *conn,
> > > 
> > >           struct timeval tv;
> > >           dbus_uint64_t newval;
> > > 
> > > +         if (type == DBUS_TYPE_VARIANT) {
> > > +                 DBusMessageIter variant=value;
> > > +                 dbus_message_iter_recurse(&variant,&value);
> > > +                 type = dbus_message_iter_get_arg_type(&value);
> > > +         }
> > > 
> > >           if (type != DBUS_TYPE_UINT64)
> > >           
> > >                   return __connman_error_invalid_arguments(msg);
> > 
> > I prefer that we only accept variant encoded types. Everything else is
> > actually a bug. The API should be clear and there should be only one way
> > for the D-Bus wire protocol to encode this.
> I think the linux kernel guys are pretty good at phasing out old interfaces.
> So why not ease the pain with a warning and phase out the old (wrong) 
> interface in a later version. The code baggage is not that much and it really 
> eases the transition? The error message could just be placed in a new else 
> part of the new type == variant branch.

normally I would agree with you here, but we are in the special
situation that we already break API for the upcoming 1.0 release and
thus it is a good idea for clean break with this as well.

> But its just a small patch from my side so i really don't care as long as i 
> can send the variants to the interface :-).
> 
> Also i think these patches are already applied to the repository by Daniel 
> Wagner (haven't had the time to check), so i am a little usure how to proceed?

Can you check please.

Regards

Marcel


_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to