am c4c58b24: Merge "Fix native crash" into jb-mr1-dev

* commit 'c4c58b249e02c944f05107398f1d32e3c41e28d1':
  Fix native crash
This commit is contained in:
Irfan Sheriff 2012-10-12 12:02:04 -07:00 committed by Android Git Automerger
commit 605ca505f4

View file

@ -727,10 +727,10 @@ 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 {
return -2;
} else if (rfds[1].revents & POLLIN) {
wifi_close_sockets(index);
}
return 0;
return -2;
}
int wifi_wait_on_socket(int index, char *buf, size_t buflen)
@ -837,9 +837,9 @@ void wifi_close_supplicant_connection(const char *ifname)
* STA connection does not need it since supplicant gets shutdown
*/
TEMP_FAILURE_RETRY(write(exit_sockets[SECONDARY][0], "T", 1));
wifi_close_sockets(SECONDARY);
//closing p2p connection does not need a wait on
//supplicant stop
/* p2p sockets are closed after the monitor thread
* receives the terminate on the exit socket
*/
return;
}