Skip to content
Permalink
Browse files

wifi: fix compile error that... I didn't have earlier...

  • Loading branch information
Dazzozo committed Jan 25, 2013
1 parent 45460ad commit ae0e83f67084b5a1cafb4024ddf65088a6735857
Showing with 23 additions and 23 deletions.
  1. +23 −23 libhardware_legacy/wifi/wifi.c
@@ -1025,6 +1025,29 @@ int wifi_send_command(int index, const char *cmd, char *reply, size_t *reply_len
return 0;
}

void wifi_close_sockets(int index)
{
if (ctrl_conn[index] != NULL) {
wpa_ctrl_close(ctrl_conn[index]);
ctrl_conn[index] = NULL;
}

if (monitor_conn[index] != NULL) {
wpa_ctrl_close(monitor_conn[index]);
monitor_conn[index] = NULL;
}

if (exit_sockets[index][0] >= 0) {
close(exit_sockets[index][0]);
exit_sockets[index][0] = -1;
}

if (exit_sockets[index][1] >= 0) {
close(exit_sockets[index][1]);
exit_sockets[index][1] = -1;
}
}

int wifi_ctrl_recv(int index, char *reply, size_t *reply_len)
{
int res;
@@ -1124,29 +1147,6 @@ int wifi_wait_for_event(const char *ifname, char *buf, size_t buflen)
}
}

void wifi_close_sockets(int index)
{
if (ctrl_conn[index] != NULL) {
wpa_ctrl_close(ctrl_conn[index]);
ctrl_conn[index] = NULL;
}

if (monitor_conn[index] != NULL) {
wpa_ctrl_close(monitor_conn[index]);
monitor_conn[index] = NULL;
}

if (exit_sockets[index][0] >= 0) {
close(exit_sockets[index][0]);
exit_sockets[index][0] = -1;
}

if (exit_sockets[index][1] >= 0) {
close(exit_sockets[index][1]);
exit_sockets[index][1] = -1;
}
}

void wifi_close_supplicant_connection(const char *ifname)
{
char supp_status[PROPERTY_VALUE_MAX] = {'\0'};

0 comments on commit ae0e83f

Please sign in to comment.
You can’t perform that action at this time.