diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-08-15 14:55:55 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-08-15 14:55:55 +0000 |
commit | a23442be507d9384175898a28fb72c35f790fbd1 (patch) | |
tree | 3dd4230b91278f28cba1a69fe23ce663c15e462b /hcid/dbus-adapter.c | |
parent | af123a9010de988e3dc9b2f2a67f3a140e309c3f (diff) |
load/set the default options after HCI_DEV_UP
Diffstat (limited to 'hcid/dbus-adapter.c')
-rw-r--r-- | hcid/dbus-adapter.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index bec28be2..02cc85c9 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -2382,6 +2382,7 @@ static struct service_data dev_services[] = { DBusHandlerResult msg_func_device(DBusConnection *conn, DBusMessage *msg, void *data) { + const struct hci_dbus_data *pdata = data; const char *iface, *name; iface = dbus_message_get_interface(msg); @@ -2390,7 +2391,12 @@ DBusHandlerResult msg_func_device(DBusConnection *conn, DBusMessage *msg, void * if (!strcmp(DBUS_INTERFACE_INTROSPECTABLE, iface) && !strcmp("Introspect", name)) { return simple_introspect(conn, msg, data); - } else if (!strcmp(ADAPTER_INTERFACE, iface)) { + } + + if (!pdata->up) + return error_not_ready(conn, msg); + else + if (!strcmp(ADAPTER_INTERFACE, iface)) { service_handler_func_t handler; handler = find_service_handler(dev_services, msg); |