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

Commit 4ee084ab authored by Srinu Jella's avatar Srinu Jella Committed by android-build-merger
Browse files

Merge "Synchronize hl data operations"

am: 67302a08

Change-Id: I65ef2e27332de47e921f15aaca76668cc75f9567
parents 8211524a 67302a08
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -372,6 +372,11 @@ void bta_hl_dch_ci_get_tx_data(uint8_t app_idx, uint8_t mcl_idx,
  APPL_TRACE_DEBUG("bta_hl_dch_ci_get_tx_data");
#endif

  if (p_data != NULL) {
    status = p_data->ci_get_put_data.status;
    APPL_TRACE_WARNING("%s: status=%d", __func__, status);
  }

  p_dcb->cout_oper &= ~BTA_HL_CO_GET_TX_DATA_MASK;

  if (p_dcb->close_pending) {
@@ -381,6 +386,8 @@ void bta_hl_dch_ci_get_tx_data(uint8_t app_idx, uint8_t mcl_idx,
    if (!p_dcb->cout_oper) {
      close_dch = true;
    }
  } else if (status == BTA_HL_STATUS_FAIL) {
    free_buf = TRUE;
  } else {
    result = MCA_WriteReq((tMCA_DL)p_dcb->mdl_handle, p_dcb->p_tx_pkt);
    if (result != MCA_SUCCESS) {
+1 −1
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@ void bta_hl_co_get_tx_data(uint8_t app_id, tBTA_HL_MDL_HANDLE mdl_handle,
                                        &mdl_idx)) {
    p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx);

    if (p_dcb->tx_size <= buf_size) {
    if ((p_dcb->tx_size <= buf_size) && p_dcb->p_tx_pkt) {
      memcpy(p_buf, p_dcb->p_tx_pkt, p_dcb->tx_size);
      osi_free_and_reset((void**)&p_dcb->p_tx_pkt);
      p_dcb->tx_size = 0;