avctp_state_t avctp_state;
guint control_timer;
- guint avdtp_timer;
guint dc_id;
gboolean disconnecting;
if (priv) {
if (priv->control_timer)
g_source_remove(priv->control_timer);
- if (priv->avdtp_timer)
- g_source_remove(priv->avdtp_timer);
if (priv->dc_id)
device_remove_disconnect_watch(dev->btd_dev,
priv->dc_id);
dev->priv->control_timer = 0;
}
-static void device_remove_avdtp_timer(struct audio_device *dev)
-{
- if (dev->priv->avdtp_timer)
- g_source_remove(dev->priv->avdtp_timer);
- dev->priv->avdtp_timer = 0;
-}
-
static void disconnect_cb(struct btd_device *btd_dev, gboolean removal,
void *user_data)
{
priv->disconnecting = TRUE;
device_remove_control_timer(dev);
- device_remove_avdtp_timer(dev);
if (dev->control)
avrcp_disconnect(dev);
device_set_state(dev, AUDIO_STATE_DISCONNECTED);
break;
case SINK_STATE_CONNECTING:
- device_remove_avdtp_timer(dev);
device_set_state(dev, AUDIO_STATE_CONNECTING);
break;
case SINK_STATE_CONNECTED: