Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b59562c2 authored by Chris Manton's avatar Chris Manton
Browse files

Re-log stack/avct/avct_lcb_act::avct_lcb_chk_disc

Towards encapsulated code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Id9bf35ae2128758ea7b6fc8842c9a60b1cafaf5e
parent 0f4689ac
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include "bt_utils.h"
#include "bta/include/bta_api.h"
#include "btm_api.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "stack/btm/btm_sec.h"

@@ -360,20 +361,17 @@ void avct_lcb_bind_conn(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data) {
 *                  close channel.  Otherwise just deallocate and call
 *                  callback.
 *
 *
 * Returns          Nothing.
 *
 ******************************************************************************/
void avct_lcb_chk_disc(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data) {
  AVCT_TRACE_WARNING("%s", __func__);

  avct_close_bcb(p_lcb, p_data);
  if (avct_lcb_last_ccb(p_lcb, p_data->p_ccb)) {
    AVCT_TRACE_WARNING("%s: closing", __func__);
    LOG_INFO("Closing last avct channel to device");
    p_data->p_ccb->ch_close = true;
    avct_lcb_event(p_lcb, AVCT_LCB_INT_CLOSE_EVT, p_data);
  } else {
    AVCT_TRACE_WARNING("%s: dealloc ccb", __func__);
    LOG_INFO("Closing avct channel with active remaining channels");
    avct_lcb_unbind_disc(p_lcb, p_data);
  }
}