Diff between 67dab2d2aeec9ab895da6afd528ec0c63e657ff4 and 07bf7e9098188e9328bcc8606b1812067884263c

Changed Files

File Additions Deletions Status
doc/adapter-api.txt +0 -7 modified
src/adapter.c +0 -38 modified

Full Patch

diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
index 3582793..983a20d 100644
--- a/doc/adapter-api.txt
+++ b/doc/adapter-api.txt
@@ -64,13 +64,6 @@ Methods		void RequestSession()
 					 org.bluez.Error.Failed
 					 org.bluez.Error.NotAuthorized
 
-		object FindDevice(string address)
-
-			Returns the object path of device for given address.
-
-			Possible Errors: org.bluez.Error.DoesNotExist
-					 org.bluez.Error.InvalidArguments
-
 		void RemoveDevice(object device)
 
 			This removes the remote device object at the given
diff --git a/src/adapter.c b/src/adapter.c
index 9c36aed..658e83a 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1521,40 +1521,6 @@ static DBusMessage *remove_device(DBusConnection *conn, DBusMessage *msg,
 	return NULL;
 }
 
-static DBusMessage *find_device(DBusConnection *conn, DBusMessage *msg,
-								void *data)
-{
-	struct btd_adapter *adapter = data;
-	struct btd_device *device;
-	DBusMessage *reply;
-	const gchar *address;
-	GSList *l;
-	const gchar *dev_path;
-
-	if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &address,
-						DBUS_TYPE_INVALID))
-		return btd_error_invalid_args(msg);
-
-	l = g_slist_find_custom(adapter->devices,
-			address, (GCompareFunc) device_address_cmp);
-	if (!l)
-		return btd_error_does_not_exist(msg);
-
-	device = l->data;
-
-	reply = dbus_message_new_method_return(msg);
-	if (!reply)
-		return NULL;
-
-	dev_path = device_get_path(device);
-
-	dbus_message_append_args(reply,
-				DBUS_TYPE_OBJECT_PATH, &dev_path,
-				DBUS_TYPE_INVALID);
-
-	return reply;
-}
-
 static void agent_removed(struct agent *agent, struct btd_adapter *adapter)
 {
 	mgmt_set_io_capability(adapter->dev_id, IO_CAPABILITY_NOINPUTNOOUTPUT);
@@ -1626,10 +1592,6 @@ static const GDBusMethodTable adapter_methods[] = {
 	{ GDBUS_ASYNC_METHOD("RemoveDevice",
 			GDBUS_ARGS({ "device", "o" }), NULL,
 			remove_device) },
-	{ GDBUS_METHOD("FindDevice",
-			GDBUS_ARGS({ "address", "s" }),
-			GDBUS_ARGS({ "device", "o" }),
-			find_device) },
 	{ GDBUS_METHOD("RegisterAgent",
 			GDBUS_ARGS({ "agent", "o" },
 					{ "capability", "s" }), NULL,