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

Commit f6fd6257 authored by yamei du's avatar yamei du Committed by Automerger Merge Worker
Browse files

SMP: Use correct SMP pair fail reason am: 79eed764

parents ddd194a5 79eed764
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

#include <cstring>

#include "android_bluetooth_flags.h"
#include "btif/include/btif_common.h"
#include "btif/include/core_callbacks.h"
#include "btif/include/stack_manager_t.h"
@@ -520,9 +521,13 @@ void smp_proc_pair_fail(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
    LOG_WARN("rcvd_cmd_len %d too short: must be at least 2",
             p_cb->rcvd_cmd_len);
    p_cb->status = SMP_INVALID_PARAMETERS;
  } else {
    if (IS_FLAG_ENABLED(fix_pairing_failure_reason_from_remote)) {
      p_cb->status = static_cast<tSMP_STATUS>(p_data->p_data[0]);
    } else {
      p_cb->status = p_data->status;
    }
  }

  /* Cancel pending auth complete timer if set */
  alarm_cancel(p_cb->delayed_auth_timer_ent);