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
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);
}