summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-12-15 17:17:55 +0100
committerMarcel Holtmann <marcel@holtmann.org>2012-12-15 17:17:55 +0100
commit4da2b7765dfb089214cc6e8b64528b0c6c43f009 (patch)
tree9e94a437cad5ad363d607caf655ac148e18781f3
parentab872c6f960dc3734ebf1c38dbbc4252009db2dc (diff)
core: Remove support for device pair method parameters
-rw-r--r--src/device.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/device.c b/src/device.c
index 77466ff0b..29518bd34 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1477,21 +1477,13 @@ static DBusMessage *pair_device(DBusConnection *conn, DBusMessage *msg,
{
struct btd_device *device = data;
struct btd_adapter *adapter = device->adapter;
- const char *agent_path, *capability;
struct bonding_req *bonding;
uint8_t io_cap;
int err;
device_set_temporary(device, FALSE);
- if (!dbus_message_get_args(msg, NULL,
- DBUS_TYPE_OBJECT_PATH, &agent_path,
- DBUS_TYPE_STRING, &capability,
- DBUS_TYPE_INVALID))
- return btd_error_invalid_args(msg);
-
- io_cap = parse_io_capability(capability);
- if (io_cap == IO_CAPABILITY_INVALID)
+ if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_INVALID))
return btd_error_invalid_args(msg);
if (device->bonding)
@@ -1500,7 +1492,9 @@ static DBusMessage *pair_device(DBusConnection *conn, DBusMessage *msg,
if (device_is_bonded(device))
return btd_error_already_exists(msg);
- bonding = bonding_request_new(msg, device, agent_path, io_cap);
+ io_cap = parse_io_capability("");
+
+ bonding = bonding_request_new(msg, device, NULL, io_cap);
bonding->listener_id = g_dbus_add_disconnect_watch(
btd_get_dbus_connection(),
@@ -1547,9 +1541,7 @@ static const GDBusMethodTable device_methods[] = {
NULL, connect_profile) },
{ GDBUS_ASYNC_METHOD("DisconnectProfile", GDBUS_ARGS({ "UUID", "s" }),
NULL, disconnect_profile) },
- { GDBUS_ASYNC_METHOD("Pair",
- GDBUS_ARGS({ "agent", "o" }, { "capability", "s" }),
- NULL, pair_device) },
+ { GDBUS_ASYNC_METHOD("Pair", NULL, NULL, pair_device) },
{ GDBUS_METHOD("CancelPairing", NULL, NULL, cancel_pairing) },
{ }
};