diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2006-09-20 12:33:01 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2006-09-20 12:33:01 +0000 |
commit | d75af5636343673c811abfd5ae3fb09e5fab47fd (patch) | |
tree | 372a15ee83bba64918fa6127608fe145e495c21f /hcid/dbus-adapter.c | |
parent | a249cdf97cf304d6c29eabc7a32d7e25eb4c5098 (diff) |
Fix sending the right HCI command when a discovery is canceled
Diffstat (limited to 'hcid/dbus-adapter.c')
-rw-r--r-- | hcid/dbus-adapter.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index 1c6213c4..9edaec79 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -1463,7 +1463,7 @@ static DBusHandlerResult handle_dev_get_remote_name_req(DBusConnection *conn, DB * if there is a discover process running, just queue the request. * Otherwise, send the HCI cmd to get the remote name */ - if (!(dbus_data->inq_active || dbus_data->pinq_active)) + if (!(dbus_data->disc_active || dbus_data->pdisc_active)) disc_device_req_name(dbus_data); return error_request_deferred(conn, msg); @@ -1933,7 +1933,7 @@ static DBusHandlerResult handle_dev_create_bonding_req(DBusConnection *conn, DBu str2ba(peer_addr, &peer_bdaddr); /* check if there is a pending discover: requested by D-Bus/non clients */ - if (dbus_data->inq_active || !dbus_data->pinq_idle) + if (dbus_data->disc_active || !dbus_data->pinq_idle) return error_discover_in_progress(conn, msg); cancel_remote_name(dbus_data); @@ -2305,7 +2305,7 @@ static DBusHandlerResult handle_dev_start_periodic_req(DBusConnection *conn, DBu if (!dbus_message_has_signature(msg, DBUS_TYPE_INVALID_AS_STRING)) return error_invalid_arguments(conn, msg); - if (dbus_data->inq_active || dbus_data->pinq_active) + if (dbus_data->disc_active || dbus_data->pdisc_active) return error_discover_in_progress(conn, msg); cancel_remote_name(dbus_data); @@ -2370,7 +2370,7 @@ static DBusHandlerResult handle_dev_stop_periodic_req(DBusConnection *conn, DBus if (!dbus_message_has_signature(msg, DBUS_TYPE_INVALID_AS_STRING)) return error_invalid_arguments(conn, msg); - if (!dbus_data->pinq_active) + if (!dbus_data->pdisc_active) return error_not_authorized(conn, msg); /* only the requestor can stop the periodic inquiry */ @@ -2411,7 +2411,7 @@ static DBusHandlerResult handle_dev_discover_devices_req(DBusConnection *conn, D if (!dbus_message_has_signature(msg, DBUS_TYPE_INVALID_AS_STRING)) return error_invalid_arguments(conn, msg); - if (dbus_data->inq_active || dbus_data->pinq_active) + if (dbus_data->disc_active || dbus_data->pdisc_active) return error_discover_in_progress(conn, msg); cancel_remote_name(dbus_data); @@ -2486,7 +2486,7 @@ static DBusHandlerResult handle_dev_cancel_discovery_req(DBusConnection *conn, D return error_invalid_arguments(conn, msg); /* is there discover pending? or discovery cancel was requested previously */ - if (!dbus_data->inq_active || dbus_data->discovery_cancel) + if (!dbus_data->disc_active || dbus_data->discovery_cancel) return error_not_authorized(conn, msg); /* only the discover requestor can cancel the inquiry process */ |