guint retry_timer;
struct timespec attempt_start_time;
long last_attempt_duration_ms;
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ GIOChannel *io;
+#endif
};
typedef enum {
conn_info->accept_io = io;
}
}
+
+void device_set_le_bonding_io(struct btd_device *device, GIOChannel *io)
+{
+ if (device->bonding) {
+ device->bonding->io = io;
+ }
+}
#endif
static void append_manufacturer_data(void *data, void *user_data)
if (!bonding)
return;
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (bonding->io) {
+ g_io_channel_shutdown(bonding->io, FALSE, NULL);
+ g_io_channel_unref(bonding->io);
+ }
+#endif
+
if (bonding->listener_id)
g_dbus_remove_watch(dbus_conn, bonding->listener_id);
* this in the ATT connect callback)
*/
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
- if (((conn_type == DEV_CONN_LE && bdaddr_type != BDADDR_BREDR) ||
- (connect_le)) && !device->le_state.connected)
- err = device_connect_le(device);
- else if (connect_le) /* Send bonding request if LE is already connected*/
+ if ((conn_type == DEV_CONN_LE && bdaddr_type != BDADDR_BREDR) || connect_le)
err = adapter_create_bonding(adapter, &device->bdaddr,
bdaddr_type, io_cap);
else
void btd_device_set_svc_changed_indication(struct btd_device *dev, bool value);
bool btd_device_get_svc_changed_indication(struct btd_device *dev);
void device_set_accept_io(const struct btd_device *device, GIOChannel *io);
+void device_set_le_bonding_io(struct btd_device *device, GIOChannel *io);
#ifdef TIZEN_FEATURE_BLUEZ_BATTERY_WATCH
void device_change_pkt_type(gpointer data, gpointer user_data);
#endif /* TIZEN_FEATURE_BLUEZ_BATTERY_WATCH */
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
device_set_accept_io(device, io);
+ device_set_le_bonding_io(device, io);
if (btd_device_get_svc_changed_indication(device)) {
send_service_changed_indication_on_reconnect(device,