summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-02-08 01:22:31 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-02-08 01:22:31 +0000
commita1018ae90706783c45c1c3814af3354b4b5504c8 (patch)
tree427c4599c937eea1664c70d2e9755152d7432e43
parent9d007935a92f56f6470a9f677afc7fb05f17d0b3 (diff)
Update default device and don't change scan enable value
-rw-r--r--hcid/dbus.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/hcid/dbus.c b/hcid/dbus.c
index ce3c3a5e..c85eadc7 100644
--- a/hcid/dbus.c
+++ b/hcid/dbus.c
@@ -1057,10 +1057,8 @@ failed:
ret = unregister_device_path(path);
- /* FIXME: If there are any devices left after this removal the default
- * device should be changed to one of them */
if (ret && default_dev == id)
- default_dev = -1;
+ default_dev = hci_get_route(NULL);
return ret;
}
@@ -1921,8 +1919,6 @@ static DBusMessage* handle_device_up_req(DBusMessage *msg, void *data)
{
DBusMessage *reply = NULL;
struct hci_dbus_data *dbus_data = data;
- struct hci_dev_info di;
- struct hci_dev_req dr;
int sk = -1;
/* Create and bind HCI socket */
@@ -1941,18 +1937,6 @@ static DBusMessage* handle_device_up_req(DBusMessage *msg, void *data)
goto failed;
}
- if (ioctl(sk, HCIGETDEVINFO, (void *) &di) >= 0 &&
- !hci_test_bit(HCI_RAW, &di.flags)) {
- dr.dev_id = dbus_data->dev_id;
- dr.dev_opt = SCAN_PAGE | SCAN_INQUIRY; /* piscan */
- if (ioctl(sk, HCISETSCAN, (unsigned long) &dr) < 0) {
- syslog(LOG_ERR, "Can't set scan mode on hci%d: %s (%d)",
- dbus_data->dev_id, strerror(errno), errno);
- reply = bluez_new_failure_msg(msg, BLUEZ_ESYSTEM_OFFSET + errno);
- goto failed;
- }
- }
-
reply = dbus_message_new_method_return(msg);
failed: