diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-06-17 11:31:24 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-06-17 11:31:24 +0000 |
commit | e3d4217d0d3d1723b2d5629c232d9e41e9e047bf (patch) | |
tree | c630fabcd1c9f0665a4d7df107a4647b8227996f | |
parent | 57eb59510dc89b134cc35bdac9949bceab7da1d6 (diff) |
Don't configure raw devices
-rw-r--r-- | hcid/dbus.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hcid/dbus.c b/hcid/dbus.c index 53bf7b244..d124c76f4 100644 --- a/hcid/dbus.c +++ b/hcid/dbus.c @@ -427,6 +427,7 @@ int hcid_dbus_register_device(uint16_t id) DBusMessage *message = NULL; int i, err, dd = -1, ret = -1; read_scan_enable_rp rp; + struct hci_dev_info di; struct hci_request rq; struct hci_dbus_data* pdata; struct hci_conn_list_req *cl = NULL; @@ -434,6 +435,14 @@ int hcid_dbus_register_device(uint16_t id) snprintf(path, sizeof(path), "%s/hci%d", BASE_PATH, id); if (register_dbus_path(path, id, &obj_dev_vtable, FALSE) < 0) + return -1; + + if (hci_devinfo(id, &di) < 0) { + error("Getting device info failed: hci%d", id); + return -1; + } + + if (hci_test_bit(HCI_RAW, &di.flags)) return -1; dd = hci_open_dev(id); |