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>
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;
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);
}