Hi,
When using the D-Bus API I've found that both Device and Manager have a
property each where when using SetProperty they return an invalid
arguments error when setting the property to the same value as is
already set.
This seems a bit draconian so I've attached a patch to return silently
instead.
Regards,
Joshua
--
Joshua Lock
Intel Open Source Technology Centre
>From eccc8deb56ef43dbabbebc161bfc1f980759634b Mon Sep 17 00:00:00 2001
From: Joshua Lock <[email protected]>
Date: Tue, 30 Jun 2009 12:12:46 +0100
Subject: [PATCH] Don't return error when trying to set the same property value
---
src/device.c | 2 +-
src/manager.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index 347f651..141f61e 100644
--- a/src/device.c
+++ b/src/device.c
@@ -366,7 +366,7 @@ static DBusMessage *set_property(DBusConnection *conn,
dbus_message_iter_get_basic(&value, &powered);
if (device->powered == powered)
- return __connman_error_invalid_arguments(msg);
+ return;
if (device->pending != NULL)
return __connman_error_in_progress(msg);
diff --git a/src/manager.c b/src/manager.c
index a6c6021..cc6c116 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -201,7 +201,7 @@ static DBusMessage *set_property(DBusConnection *conn,
dbus_message_iter_get_basic(&value, &offlinemode);
if (global_offlinemode == offlinemode)
- return __connman_error_invalid_arguments(msg);
+ return;
global_offlinemode = offlinemode;
--
1.6.2.5
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman