--- bluez-utils-cvs.orig/hcid/dbus.c 2006-02-17 11:31:06.000000000 -0200 +++ bluez-utils-cvs-timer/hcid/dbus.c 2006-02-17 12:43:34.000000000 -0200 @@ -67,6 +67,11 @@ bdaddr_t bda; }; +/* + * Timeout functions Protypes + */ +static int discoverable_timeout_handler(void *data); + DBusConnection *get_dbus_connection(void) { return connection; @@ -315,6 +320,13 @@ else pdata->mode = rp.enable; /* Keep the current scan status */ + /* + * Enable timeout to address dbus daemon restart, where + * register the device paths is required due connection lost. + */ + if (pdata->mode & SCAN_INQUIRY) + pdata->timeout_handler = &discoverable_timeout_handler; + message = dbus_message_new_signal(MANAGER_PATH, MANAGER_INTERFACE, BLUEZ_MGR_DEV_ADDED); if (message == NULL) {