am 6d4af736: am 06eda4e2: Merge "Fix native crash when driver commands time out" into jb-mr1-dev
* commit '6d4af736d09fcc7165d3e36bc86b7292d76ad1a4':
Fix native crash when driver commands time out
diff --git a/wifi/wifi.c b/wifi/wifi.c
index f669693..d62b30f 100644
--- a/wifi/wifi.c
+++ b/wifi/wifi.c
@@ -728,7 +728,13 @@
if (rfds[0].revents & POLLIN) {
return wpa_ctrl_recv(monitor_conn[index], reply, reply_len);
} else if (rfds[1].revents & POLLIN) {
- wifi_close_sockets(index);
+ /* Close only the p2p sockets on receive side
+ * see wifi_close_supplicant_connection()
+ */
+ if (index == SECONDARY) {
+ ALOGD("close sockets %d", index);
+ wifi_close_sockets(index);
+ }
}
return -2;
}