aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2013-09-05 21:52:18 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-22 16:03:24 (GMT)
commit7b74c0acfba896a442818af2d9d925d3aa004e21 (patch)
tree3f276e08ee8f6485901d9bd2d073035e8e937a63
parent92ecda40e09e6b1bf5449226661ab0304e50262b (diff)
downloadhostap-7b74c0acfba896a442818af2d9d925d3aa004e21.zip
hostap-7b74c0acfba896a442818af2d9d925d3aa004e21.tar.gz
hostap-7b74c0acfba896a442818af2d9d925d3aa004e21.tar.bz2
Android: Clean entire socket directory
Despite interface (and group) related sockets are not used for control, they are created and may be left. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--src/common/wpa_ctrl.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/common/wpa_ctrl.c b/src/common/wpa_ctrl.c
index d9a7509..83788d7 100644
--- a/src/common/wpa_ctrl.c
+++ b/src/common/wpa_ctrl.c
@@ -229,7 +229,6 @@ void wpa_ctrl_cleanup(void)
struct dirent entry;
struct dirent *result;
size_t dirnamelen;
- int prefixlen = os_strlen(CONFIG_CTRL_IFACE_CLIENT_PREFIX);
size_t maxcopy;
char pathname[PATH_MAX];
char *namep;
@@ -246,11 +245,8 @@ void wpa_ctrl_cleanup(void)
namep = pathname + dirnamelen;
maxcopy = PATH_MAX - dirnamelen;
while (readdir_r(dir, &entry, &result) == 0 && result != NULL) {
- if (os_strncmp(entry.d_name, CONFIG_CTRL_IFACE_CLIENT_PREFIX,
- prefixlen) == 0) {
- if (os_strlcpy(namep, entry.d_name, maxcopy) < maxcopy)
- unlink(pathname);
- }
+ if (os_strlcpy(namep, entry.d_name, maxcopy) < maxcopy)
+ unlink(pathname);
}
closedir(dir);
}