APPL_TRACE_WARNING(" bta_av_config_ind config_ind called before Open");
p_scb->coll_mask |= BTA_AV_COLL_SETCONFIG_IND;
}
- alarm_cancel(bta_av_cb.accept_signalling_timer);
+ APPL_TRACE_DEBUG(" bta_av_config_ind p_scb->hdi = %d ", p_scb->hdi);
+ alarm_cancel(bta_av_cb.accept_signalling_timer[p_scb->hdi]);
/* if no codec parameters in configuration, fail */
if ((p_evt_cfg->num_codec == 0) ||
{
hdr.layer_specific = xx + 1;
bta_av_api_deregister((tBTA_AV_DATA *)&hdr);
+ alarm_free(p_cb->accept_signalling_timer[xx]);
+ p_cb->accept_signalling_timer[xx] = NULL;
}
alarm_free(p_cb->link_signalling_timer);
p_cb->link_signalling_timer = NULL;
- alarm_free(p_cb->accept_signalling_timer);
- p_cb->accept_signalling_timer = NULL;
}
/*******************************************************************************
p_cb->p_scb[xx]->peer_addr);
/* Possible collision : need to avoid outgoing processing while the timer is running */
p_cb->p_scb[xx]->coll_mask = BTA_AV_COLL_INC_TMR;
- alarm_set_on_queue(p_cb->accept_signalling_timer,
+ alarm_set_on_queue(p_cb->accept_signalling_timer[xx],
BTA_AV_ACCEPT_SIGNALLING_TIMEOUT_MS,
bta_av_accept_signalling_timer_cback,
UINT_TO_PTR(xx),
/* We are still doing SDP. Run the timer again. */
p_scb->coll_mask |= BTA_AV_COLL_INC_TMR;
- alarm_set_on_queue(p_cb->accept_signalling_timer,
+ alarm_set_on_queue(p_cb->accept_signalling_timer[inx],
BTA_AV_ACCEPT_SIGNALLING_TIMEOUT_MS,
bta_av_accept_signalling_timer_cback,
UINT_TO_PTR(inx),
tBTA_AV_RCB rcb[BTA_AV_NUM_RCB]; /* RCB control block */
tBTA_AV_LCB lcb[BTA_AV_NUM_LINKS+1]; /* link control block */
alarm_t *link_signalling_timer;
- alarm_t *accept_signalling_timer; /* timer to monitor signalling when accepting */
+ alarm_t *accept_signalling_timer[BTA_AV_NUM_STRS]; /* timer to monitor signalling when accepting */
UINT32 sdp_a2d_handle; /* SDP record handle for audio src */
#if (BTA_AV_SINK_INCLUDED == TRUE)
UINT32 sdp_a2d_snk_handle; /* SDP record handle for audio snk */
* to alarm_free() the alarms below.
*/
bta_av_cb.link_signalling_timer = alarm_new("bta_av.link_signalling_timer");
- bta_av_cb.accept_signalling_timer =
- alarm_new("bta_av.accept_signalling_timer");
+ for (int j = 0; j < BTA_AV_NUM_STRS; j++)
+ {
+ bta_av_cb.accept_signalling_timer[j] =
+ alarm_new("bta_av.accept_signalling_timer");
+ }
/* store parameters */
bta_av_cb.p_cback = p_data->api_enable.p_cback;