Issue:
Post bonding process, temporary gatt connections are
created to perform device name discovery and remote
device discovery before any profile level connections
are made for remote devices. At every disconnection
the number of apps holding the physical link is validated
to keep the link alive. A disconnection starts the idle
timeout of 1sec if there is no other apps available.
However, a new logical connection is unable to reset
the timer, even if the link comes up, within 1sec of
the last disconnection.
Fix:
At every connection occuring within the "No app timeout",
the link timer is cancelled since there is still a gatt_if
that needs to keep the link alive.
CRs-Fixed:
1050047
Change-Id: I3205894e4d692e4e8b1a547b6fb4d346c4f281a5
if (ret)
{
- gatt_update_app_use_link_flag(p_reg->gatt_if, p_tcb, TRUE, FALSE);
+ gatt_update_app_use_link_flag(p_reg->gatt_if, p_tcb, TRUE, TRUE);
}
return ret;
}
}
+ if (timeout_ms == (1000) * (0xFFFF))
+ start_timeout = false;
+
if (start_timeout) {
- L2CAP_TRACE_DEBUG("%s starting IDLE timeout: %d ms", __func__,
+ L2CAP_TRACE_DEBUG("%s starting IDLE timeout: %llu ms", __func__,
timeout_ms);
alarm_set_on_queue(p_lcb->l2c_lcb_timer, timeout_ms,
l2c_lcb_timer_timeout, p_lcb,
btu_general_alarm_queue);
} else {
+ L2CAP_TRACE_DEBUG("%s, alarm cancel", __func__);
alarm_cancel(p_lcb->l2c_lcb_timer);
}
}