Loading system/stack/gatt/gatt_main.cc +3 −1 Original line number Diff line number Diff line Loading @@ -130,7 +130,9 @@ void gatt_init(void) { // clients exist fixed_reg.default_idle_tout = L2CAP_NO_IDLE_TIMEOUT; L2CA_RegisterFixedChannel(L2CAP_ATT_CID, &fixed_reg); if (!L2CA_RegisterFixedChannel(L2CAP_ATT_CID, &fixed_reg)) { log::error("Unable to register L2CAP ATT fixed channel"); } gatt_cb.over_br_enabled = osi_property_get_bool("bluetooth.gatt.over_bredr.enabled", true); Loading system/stack/smp/smp_l2c.cc +13 −3 Original line number Diff line number Diff line Loading @@ -74,12 +74,19 @@ void smp_l2cap_if_init(void) { fixed_reg.default_idle_tout = 60; /* set 60 seconds timeout, 0xffff default idle timeout */ L2CA_RegisterFixedChannel(L2CAP_SMP_CID, &fixed_reg); if (!L2CA_RegisterFixedChannel(L2CAP_SMP_CID, &fixed_reg)) { log::error("Unable to register with L2CAP fixed channel profile SMP psm:{}", L2CAP_SMP_CID); } fixed_reg.pL2CA_FixedConn_Cb = smp_br_connect_callback; fixed_reg.pL2CA_FixedData_Cb = smp_br_data_received; L2CA_RegisterFixedChannel(L2CAP_SMP_BR_CID, &fixed_reg); if (!L2CA_RegisterFixedChannel(L2CAP_SMP_BR_CID, &fixed_reg)) { log::error( "Unable to register with L2CAP fixed channel profile SMP_BR psm:{}", L2CAP_SMP_BR_CID); } } /******************************************************************************* Loading Loading @@ -208,7 +215,10 @@ static void smp_data_received(uint16_t channel, const RawAddress& bd_addr, smp_int_data.p_data = p; smp_sm_event(p_cb, static_cast<tSMP_EVENT>(cmd), &smp_int_data); } else { L2CA_RemoveFixedChnl(channel, bd_addr); if (!L2CA_RemoveFixedChnl(channel, bd_addr)) { log::error("Unable to remove fixed channel peer:{} cid:{}", bd_addr, channel); } } osi_free(p_buf); Loading Loading
system/stack/gatt/gatt_main.cc +3 −1 Original line number Diff line number Diff line Loading @@ -130,7 +130,9 @@ void gatt_init(void) { // clients exist fixed_reg.default_idle_tout = L2CAP_NO_IDLE_TIMEOUT; L2CA_RegisterFixedChannel(L2CAP_ATT_CID, &fixed_reg); if (!L2CA_RegisterFixedChannel(L2CAP_ATT_CID, &fixed_reg)) { log::error("Unable to register L2CAP ATT fixed channel"); } gatt_cb.over_br_enabled = osi_property_get_bool("bluetooth.gatt.over_bredr.enabled", true); Loading
system/stack/smp/smp_l2c.cc +13 −3 Original line number Diff line number Diff line Loading @@ -74,12 +74,19 @@ void smp_l2cap_if_init(void) { fixed_reg.default_idle_tout = 60; /* set 60 seconds timeout, 0xffff default idle timeout */ L2CA_RegisterFixedChannel(L2CAP_SMP_CID, &fixed_reg); if (!L2CA_RegisterFixedChannel(L2CAP_SMP_CID, &fixed_reg)) { log::error("Unable to register with L2CAP fixed channel profile SMP psm:{}", L2CAP_SMP_CID); } fixed_reg.pL2CA_FixedConn_Cb = smp_br_connect_callback; fixed_reg.pL2CA_FixedData_Cb = smp_br_data_received; L2CA_RegisterFixedChannel(L2CAP_SMP_BR_CID, &fixed_reg); if (!L2CA_RegisterFixedChannel(L2CAP_SMP_BR_CID, &fixed_reg)) { log::error( "Unable to register with L2CAP fixed channel profile SMP_BR psm:{}", L2CAP_SMP_BR_CID); } } /******************************************************************************* Loading Loading @@ -208,7 +215,10 @@ static void smp_data_received(uint16_t channel, const RawAddress& bd_addr, smp_int_data.p_data = p; smp_sm_event(p_cb, static_cast<tSMP_EVENT>(cmd), &smp_int_data); } else { L2CA_RemoveFixedChnl(channel, bd_addr); if (!L2CA_RemoveFixedChnl(channel, bd_addr)) { log::error("Unable to remove fixed channel peer:{} cid:{}", bd_addr, channel); } } osi_free(p_buf); Loading