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

Commit 10605266 authored by Sharvil Nanavati's avatar Sharvil Nanavati
Browse files

Fix bug where btpan_control_state_callback is called with invalid args.

When there's a connection error, btpan_control_state_callback sometimes
gets called back with incorrect local_role and remote_role values. These
values are simply not set (uninitialized) on one of the error handling
codepaths.

http://b/12854810

Change-Id: Ie2d9d252f185fca48ee6e2bfb697039d0ac10b43
parent 7d99c254
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -456,6 +456,8 @@ void bta_pan_open(tBTA_PAN_SCB *p_scb, tBTA_PAN_DATA *p_data)
        bta_pan_scb_dealloc(p_scb);
        bdcpy(data.bd_addr, p_data->api_open.bd_addr);
        data.status = BTA_PAN_FAIL;
        data.local_role = p_data->api_open.local_role;
        data.peer_role = p_data->api_open.peer_role;
        bta_pan_cb.p_cback(BTA_PAN_OPEN_EVT, (tBTA_PAN *)&data);
    }