When two GATT client connections were sent back to back, the first
connection will not be processed due to an address comparison error.
This patch corrects the error.
Change-Id: I8eb97cd2a34a81da460f448dc71445b2898a5d32
{
if (p_clcb->in_use &&
p_clcb->p_rcb->client_if == client_if &&
- p_clcb->p_srcb &&
- bdcmp(p_clcb->p_srcb->server_bda, remote_bda) == 0)
+ bdcmp(p_clcb->bda, remote_bda) == 0)
return p_clcb;
}
return NULL;
/* if not found, try to recycle one known device */
if (!found && !p_recycle)
p_tcb = NULL;
- else if (p_recycle)
+ else if (!found && p_recycle)
p_tcb = p_recycle;
if (p_tcb != NULL)