summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-08-11 22:18:04 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-08-11 22:18:04 +0000
commitaf123a9010de988e3dc9b2f2a67f3a140e309c3f (patch)
treee10b7eb8f176f2e3a9275608d69fed11c4d6680c /hcid
parentfa6b860d5271b0517f7b4cecd7f4632d14a6db82 (diff)
Fixed discoverable timeout when detaching/attaching dongle
Diffstat (limited to 'hcid')
-rw-r--r--hcid/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hcid/main.c b/hcid/main.c
index 78c42208..6f96343e 100644
--- a/hcid/main.c
+++ b/hcid/main.c
@@ -532,12 +532,10 @@ static inline void device_event(GIOChannel *chan, evt_stack_internal *si)
if (hcid.auto_init)
init_device(sd->dev_id);
add_device(sd->dev_id);
- hcid_dbus_register_device(sd->dev_id);
break;
case HCI_DEV_UNREG:
info("HCI dev %d unregistered", sd->dev_id);
- hcid_dbus_unregister_device(sd->dev_id);
remove_device(sd->dev_id);
break;
@@ -548,10 +546,12 @@ static inline void device_event(GIOChannel *chan, evt_stack_internal *si)
if (hcid.security)
start_security_manager(sd->dev_id);
start_device(sd->dev_id);
+ hcid_dbus_register_device(sd->dev_id);
break;
case HCI_DEV_DOWN:
info("HCI dev %d down", sd->dev_id);
+ hcid_dbus_unregister_device(sd->dev_id);
if (hcid.security)
stop_security_manager(sd->dev_id);
stop_device(sd->dev_id);