diff options
author | Irfan Sheriff <isheriff@google.com> | 2012-10-18 16:27:35 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-18 16:27:36 -0700 |
commit | 06eda4e2d5cb8aff7253e6be111553086fbc9b82 (patch) | |
tree | 3f70bcdd2c183a63f00143e647bd9b6750d41b91 | |
parent | 89ef58f4c0e4920d8f18112a31a4c80c766a2afa (diff) | |
parent | 943574a822af6dfa32ad94c9f65caa79c5c6ca02 (diff) | |
download | hardware_libhardware_legacy-06eda4e2d5cb8aff7253e6be111553086fbc9b82.tar.gz hardware_libhardware_legacy-06eda4e2d5cb8aff7253e6be111553086fbc9b82.tar.bz2 hardware_libhardware_legacy-06eda4e2d5cb8aff7253e6be111553086fbc9b82.zip |
Merge "Fix native crash when driver commands time out" into jb-mr1-dev
-rw-r--r-- | wifi/wifi.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; } |