From 943574a822af6dfa32ad94c9f65caa79c5c6ca02 Mon Sep 17 00:00:00 2001 From: Irfan Sheriff Date: Thu, 18 Oct 2012 16:16:21 -0700 Subject: Fix native crash when driver commands time out Bug: 7361130 Change-Id: Ia076b4ec84a4a0e05ba9eaa53ed732fa041fca6a --- wifi/wifi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 @@ int wifi_ctrl_recv(int index, char *reply, size_t *reply_len) 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; } -- cgit v1.1