需求:
p2p: check p2p instance in all asynchronized callbacks
If cancelConnect is not called, the scan retry callback would be called several times. If P2P is disabled in this period,these asynchronized callbacks would access de-initialized p2p instance and result in native crash.
code:
------------------- wpa_supplicant/hidl/1.2/p2p_iface.cpp --------------------
index 0a6b657d..fd9ce0dc 100644
@@ -225,7 +225,7 @@ int joinScanReq(
size_t ielen;
unsigned int bands;
- if (!wpa_s->global->p2p) {
+ if (wpa_s->global->p2p == NULL || wpa_s->global->p2p_disabled) {
wpa_printf(MSG_ERROR,
"P2P: P2P interface is gone, cancel join scan");
return -ENXIO;