Remove the ISSOCKET part in checking file descrtion valid or not 53/111353/2
authorYoungHun Kim <yh8004.kim@samsung.com>
Fri, 20 Jan 2017 07:08:37 +0000 (16:08 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Fri, 20 Jan 2017 08:12:16 +0000 (17:12 +0900)
Change-Id: I7c9a31fedf89551d3f9aacb8af2447c22070ba1d

src/muse_core_ipc.c

index 320388e..4d42f2a 100644 (file)
@@ -828,11 +828,7 @@ int muse_core_ipc_set_fd(muse_module_h module, int fd)
 
 gboolean muse_core_ipc_fd_is_valid(int fd)
 {
-       struct stat st;
-
-       return (fd > STDERR_FILENO) &&
-               (fcntl(fd, F_GETFL) != -1 || errno != EBADF) &&
-               (fstat(fd, &st) != -1 && S_ISSOCK(st.st_mode));
+       return (fcntl(fd, F_GETFL) != SOCK_ERR || errno != EBADF) && (fd > STDERR_FILENO);
 }
 
 int muse_core_ipc_get_bufmgr(tbm_bufmgr *bufmgr)