bta_gattc_enqueue(p_clcb, p_data);
}
+void bta_gattc_pop_command_to_send(tBTA_GATTC_CLCB *p_clcb)
+{
+ tBTA_GATTC_DATA *p_data =
+}
+
/*******************************************************************************
**
** Function bta_gattc_fail
bdcpy(p_clcb->bda, remote_bda);
p_clcb->p_rcb = bta_gattc_cl_get_regcb(client_if);
+ p_clcb->p_cmd_list = list_new(osi_free_func);
if ((p_clcb->p_srcb = bta_gattc_find_srcb(remote_bda)) == NULL) {
p_clcb->p_srcb = bta_gattc_srcb_alloc(remote_bda);
{
p_clcb->p_q_cmd = p_data;
return TRUE;
+ } else if (p_clcb->p_cmd_list) {
+ //store the command to the command list.
+ list_append(p_clcb->p_cmd_list, (void *)p_data);
+ return FALSE;
}
- APPL_TRACE_ERROR ("%s: already has a pending command!!", __func__);
- /* skip the callback now. ----- need to send callback ? */
return FALSE;
}
tBTA_GATTC_RCB *p_rcb; /* pointer to the registration CB */
tBTA_GATTC_SERV *p_srcb; /* server cache CB */
tBTA_GATTC_DATA *p_q_cmd; /* command in queue waiting for execution */
-
+ list_t *p_cmd_list; /* The list to store the command to be sent */
#define BTA_GATTC_NO_SCHEDULE 0
#define BTA_GATTC_DISC_WAITING 0x01
#define BTA_GATTC_REQ_WAITING 0x10