diff options
Diffstat (limited to 'src/clock.c')
-rw-r--r-- | src/clock.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/clock.c b/src/clock.c index 0d7f8705..db4974de 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); @@ -200,6 +205,11 @@ static DBusMessage *set_property(DBusConnection *conn, const char *strval; enum time_updates 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_STRING) return __connman_error_invalid_arguments(msg); @@ -220,6 +230,11 @@ static DBusMessage *set_property(DBusConnection *conn, } else if (g_str_equal(name, "Timezone") == TRUE) { const char *strval; + 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_STRING) return __connman_error_invalid_arguments(msg); @@ -234,6 +249,11 @@ static DBusMessage *set_property(DBusConnection *conn, const char *strval; enum timezone_updates 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_STRING) return __connman_error_invalid_arguments(msg); @@ -254,6 +274,11 @@ static DBusMessage *set_property(DBusConnection *conn, } else if (g_str_equal(name, "Timeservers") == TRUE) { DBusMessageIter entry; + 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_ARRAY) return __connman_error_invalid_arguments(msg); |