From 495e118f01635d4e3751713552c52d53db1220a4 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 22 Nov 2013 00:28:28 +0100 Subject: [PATCH] No longer leave temporary files behind so easily --- src/applets/wpa_supplicant.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/applets/wpa_supplicant.c b/src/applets/wpa_supplicant.c index 45ded4d..75ee2d0 100644 --- a/src/applets/wpa_supplicant.c +++ b/src/applets/wpa_supplicant.c @@ -219,6 +219,7 @@ static gboolean _init_timeout(gpointer data) unlink(wpa->path); return _wpa_error(wpa, wpa->path, TRUE); } + unlink(wpa->path); /* connect to the wpa_supplicant daemon */ memset(&ru, 0, sizeof(ru)); ru.sun_family = AF_UNIX; @@ -383,8 +384,6 @@ static void _wpa_stop(WPA * wpa) if(wpa->fd != -1 && close(wpa->fd) != 0) wpa->helper->error(NULL, wpa->path, 1); wpa->fd = -1; - if(unlink(wpa->path) != 0) - wpa->helper->error(NULL, wpa->path, 1); }