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.
Regards
Marcel
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman