e_comp : 1. ERR log added for e_comp_socket_init. 2. delete existing symlink before... 65/92465/3
authorJunghwan Choi <jhhh.choi@samsung.com>
Mon, 17 Oct 2016 06:07:53 +0000 (15:07 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 17 Oct 2016 12:46:51 +0000 (05:46 -0700)
Change-Id: If69fca63c33550a9c0d24a440bd514ce5edd07fb
Signed-off-by: Junghwan Choi <jhhh.choi@samsung.com>
src/bin/e_comp.c

index 253d9b7e28d15632033d9182437f090baf28e246..7c54b59c98cb1d6d0ce8fef4a86cee5f3a276686 100644 (file)
@@ -2030,7 +2030,8 @@ e_comp_socket_init(const char *name)
                             sa->sock_access.smack.flags);
              if (res < 0)
                {
-                  PRCTL("[Winsys] Could not change smack variable for socket file: %s", socket_path);
+                  ERR("Could not change smack variable for socket file: %s (%s)", socket_path, strerror(errno));
+                  PRCTL("[Winsys] Could not change smack variable for socket file: %s (%s)", socket_path, strerror(errno));
                   return EINA_FALSE;
                }
           }
@@ -2041,8 +2042,10 @@ e_comp_socket_init(const char *name)
                            sa->sock_symlink_access.link_name);
              if (res < 0)
                {
-                  PRCTL("[Winsys] Could not make symbolic link: %s", sa->sock_symlink_access.link_name);
-                  break;
+                  ERR("Could not make symbolic link: %s (%s)", sa->sock_symlink_access.link_name, strerror(errno));
+                  PRCTL("[Winsys] Could not make symbolic link: %s (%s)", sa->sock_symlink_access.link_name, strerror(errno));
+                  if (errno != EEXIST)
+                    return EINA_FALSE;
                }
 
              uid = e_getpwnam_r(sa->sock_symlink_access.owner);
@@ -2052,8 +2055,9 @@ e_comp_socket_init(const char *name)
              res = lchown(sa->sock_symlink_access.link_name, uid, gid);
              if (res < 0)
                {
-                  PRCTL("[Winsys] chown -h owner:users %s failed!", sa->sock_symlink_access.link_name);
-                  break;
+                  ERR("chown -h owner:users %s failed! (%s)", sa->sock_symlink_access.link_name, strerror(errno));
+                  PRCTL("[Winsys] chown -h owner:users %s failed! (%s)", sa->sock_symlink_access.link_name, strerror(errno));
+                  return EINA_FALSE;
                }
 
              res = setxattr(sa->sock_symlink_access.link_name,
@@ -2063,8 +2067,9 @@ e_comp_socket_init(const char *name)
                             sa->sock_symlink_access.smack.flags);
              if (res < 0)
                {
-                  PRCTL("[Winsys] Chould not change smack variable for symbolic link: %s", sa->sock_symlink_access.link_name);
-                  break;
+                  ERR("Chould not change smack variable for symbolic link: %s (%s)", sa->sock_symlink_access.link_name, strerror(errno));
+                  PRCTL("[Winsys] Chould not change smack variable for symbolic link: %s (%s)", sa->sock_symlink_access.link_name, strerror(errno));
+                  return EINA_FALSE;
                }
           }
         break;