channel->RegisterOnCloseCallback(GetGdShimHandler()->BindOnceOn(
this, &ClassicDynamicChannelHelper::on_channel_close, cid_token));
- channel->GetQueueUpEnd()->RegisterDequeue(
- GetGdShimHandler(),
- bluetooth::common::Bind(&ClassicDynamicChannelHelper::on_incoming_data,
- bluetooth::common::Unretained(this),
- cid_token));
-
channel_enqueue_buffer_[cid_token] = std::make_unique<
bluetooth::os::EnqueueBuffer<bluetooth::packet::BasePacketBuilder>>(
channel->GetQueueUpEnd());
- channels_[cid_token] = std::move(channel);
-
if (initiator_local) {
do_in_main_thread(
FROM_HERE, base::Bind(appl_info_.pL2CA_ConnectCfm_Cb, cid_token, 0));
cid_token, L2CAP_INITIATOR_LOCAL,
base::Unretained(&cfg_info)));
}
+
+ channel->GetQueueUpEnd()->RegisterDequeue(
+ GetGdShimHandler(),
+ bluetooth::common::Bind(&ClassicDynamicChannelHelper::on_incoming_data,
+ bluetooth::common::Unretained(this),
+ cid_token));
+
+ channels_[cid_token] = std::move(channel);
}
void on_incoming_data(uint16_t cid_token) {
p_lcb->peer_addr = bd_addr;
AVCT_TRACE_DEBUG("avct_lcb_alloc %d", p_lcb->allocated);
p_lcb->tx_q = fixed_queue_new(SIZE_MAX);
+ p_lcb->peer_mtu = L2CAP_LE_MIN_MTU;
break;
}
}