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

Commit 67302a08 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Synchronize hl data operations"

parents c1c2c3fd 4b18c526
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;