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

Commit 27f955af authored by jiangzining's avatar jiangzining Committed by Zining Jiang
Browse files

HF Client: fix BIND phase error & dump AT CMD error

1. add AT_CHECK_RN in the end of BIND to handle multi cmd situation
2. fix AT CMD receive dump error

Bug: 318576477
Test: atest net_test_btif_hf_client_service & net_test_bta
Flag: EXEMPT change only for hf cilent BIND phase issue fix, no extra business logic.
Change-Id: I77879e6628a9fede307d7a8b395a56c2e16e12c0
parent 14f2ca8b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1087,6 +1087,8 @@ static char* bta_hf_client_parse_bind(tBTA_HF_CLIENT_CB* client_cb,
    buffer++;
  }

  AT_CHECK_RN(buffer);

  return buffer;
}

@@ -1623,10 +1625,10 @@ static void bta_hf_client_dump_at(tBTA_HF_CLIENT_CB* client_cb) {

  while (*p1 != '\0') {
    if (*p1 == '\r') {
      strlcpy(p2, "<cr>", 4);
      strncpy(p2, "<cr>", 4);
      p2 += 4;
    } else if (*p1 == '\n') {
      strlcpy(p2, "<lf>", 4);
      strncpy(p2, "<lf>", 4);
      p2 += 4;
    } else {
      *p2 = *p1;