summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-06-11 06:44:31 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-06-11 06:44:31 +0000
commit7e2cd30a91376eb32d6ab6edf15ff03bc7d6d1ae (patch)
treeba410f5e398007d0385a1158b1dfe08a14a10a99 /hcid
parent040982cf058f2639ad9f3bf129ca3bc5b3c93d42 (diff)
FindDevice and RemoveDevice should fail for devices that haven't still been fully created
Diffstat (limited to 'hcid')
-rw-r--r--hcid/adapter.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c
index 94eaa25a..59eceafd 100644
--- a/hcid/adapter.c
+++ b/hcid/adapter.c
@@ -3964,6 +3964,11 @@ static DBusMessage *remove_device(DBusConnection *conn,
"Device does not exist");
device = l->data;
+ if (device->temporary)
+ return g_dbus_create_error(msg,
+ ERROR_INTERFACE ".DoesNotExist",
+ "Device creation in progress");
+
adapter_remove_device(conn, adapter, device);
return dbus_message_new_method_return(msg);
@@ -3991,6 +3996,11 @@ static DBusMessage *find_device(DBusConnection *conn,
device = l->data;
+ if (device->temporary)
+ return g_dbus_create_error(msg,
+ ERROR_INTERFACE ".DoesNotExist",
+ "Device creation in progress");
+
reply = dbus_message_new_method_return(msg);
if (!reply)
return NULL;