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

Commit b6feead1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "am-5821813f-624a-468d-ae05-8b2918b15c74-nyc-dev" into nyc-dr1-dev

* changes:
  [automerger] DO NOT MERGE SMP: Check p_cb->role in smp_br_state_machine_event am: 54cfee17
  DO NOT MERGE SMP: Check p_cb->role in smp_br_state_machine_event
parents 9ebb32ae 4379991b
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
#include <string.h>
#include "btm_ble_api.h"
#include "l2c_api.h"

#include "log/log.h"
#include "smp_int.h"


@@ -264,6 +264,12 @@ static void smp_br_connect_callback(UINT16 channel, BD_ADDR bd_addr, BOOLEAN con
                     (bd_addr[4]<<8)+bd_addr[5],
                     (connected) ? "connected" : "disconnected");

    if (p_cb->role > HCI_ROLE_SLAVE) {
        SMP_TRACE_ERROR ("%s: invalid role %d", __func__, p_cb->role);
        android_errorWriteLog(0x534e4554, "80145946");
        return;
    }

    if (connected)
    {
        if(!p_cb->connect_initialized)