#endif
}
+static bool device_disappeared(gpointer user_data)
+{
+ struct btd_device *dev = user_data;
+
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (dev->le_state.connected) {
+ DBG("GATT connection exists, don't remove the device");
+ return FALSE;
+ }
+#endif
+
+ dev->temporary_timer = 0;
+
+ btd_adapter_remove_device(dev->adapter, dev);
+
+ return FALSE;
+}
+
+static void set_temporary_timer(struct btd_device *dev, unsigned int timeout)
+{
+ clear_temporary_timer(dev);
+
+ if (!timeout)
+ return;
+
+ dev->temporary_timer = timeout_add_seconds(timeout, device_disappeared,
+ dev, NULL);
+}
+
void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type)
{
struct bearer_state *state = get_state(device, bdaddr_type);
store_device_info(device);
}
-static bool device_disappeared(gpointer user_data)
-{
- struct btd_device *dev = user_data;
-
-#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
- if (dev->le_state.connected) {
- DBG("GATT connection exists, don't remove the device");
- return FALSE;
- }
-#endif
-
- dev->temporary_timer = 0;
-
- btd_adapter_remove_device(dev->adapter, dev);
-
- return FALSE;
-}
-
-static void set_temporary_timer(struct btd_device *dev, unsigned int timeout)
-{
- clear_temporary_timer(dev);
-
- if (!timeout)
- return;
-
- dev->temporary_timer = timeout_add_seconds(timeout, device_disappeared,
- dev, NULL);
-}
-
void device_update_last_seen(struct btd_device *device, uint8_t bdaddr_type)
{
if (bdaddr_type == BDADDR_BREDR)