No longer call unlink() so early as it blocks responses
This commit is contained in:
parent
9214216823
commit
bce4e14c41
@ -307,7 +307,6 @@ static gboolean _start_timeout(gpointer data)
|
|||||||
unlink(wpa->path);
|
unlink(wpa->path);
|
||||||
return _wpa_error(wpa, wpa->path, TRUE);
|
return _wpa_error(wpa, wpa->path, TRUE);
|
||||||
}
|
}
|
||||||
unlink(wpa->path);
|
|
||||||
/* connect to the wpa_supplicant daemon */
|
/* connect to the wpa_supplicant daemon */
|
||||||
memset(&ru, 0, sizeof(ru));
|
memset(&ru, 0, sizeof(ru));
|
||||||
ru.sun_family = AF_UNIX;
|
ru.sun_family = AF_UNIX;
|
||||||
@ -346,6 +345,7 @@ static gboolean _start_timeout(gpointer data)
|
|||||||
}
|
}
|
||||||
if(ret == TRUE)
|
if(ret == TRUE)
|
||||||
{
|
{
|
||||||
|
unlink(wpa->path);
|
||||||
close(wpa->fd);
|
close(wpa->fd);
|
||||||
wpa->fd = -1;
|
wpa->fd = -1;
|
||||||
}
|
}
|
||||||
@ -392,6 +392,7 @@ static void _wpa_stop(WPA * wpa)
|
|||||||
wpa->channel = NULL;
|
wpa->channel = NULL;
|
||||||
wpa->fd = -1;
|
wpa->fd = -1;
|
||||||
}
|
}
|
||||||
|
unlink(wpa->path);
|
||||||
if(wpa->fd != -1 && close(wpa->fd) != 0)
|
if(wpa->fd != -1 && close(wpa->fd) != 0)
|
||||||
wpa->helper->error(NULL, wpa->path, 1);
|
wpa->helper->error(NULL, wpa->path, 1);
|
||||||
wpa->fd = -1;
|
wpa->fd = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user