]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Android: Clean entire socket directory
authorDmitry Shmidt <dimitrysh@google.com>
Thu, 5 Sep 2013 21:52:18 +0000 (14:52 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 22 Nov 2013 16:03:24 +0000 (18:03 +0200)
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>
src/common/wpa_ctrl.c

index d9a7509397fdfbf8a0da6f9e3bb2463690346121..83788d7de84a85f159bd52a369d6d8aaf6d83cdf 100644 (file)
@@ -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);
 }