forked from enlightenment/efl
ecore-con now prints error messages when local socket creation fails
This commit is contained in:
parent
9cd2d614e9
commit
08e1f2f4f3
|
@ -371,14 +371,21 @@ start:
|
|||
|
||||
if (bind(svr->fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0)
|
||||
{
|
||||
ERR("Local socket '%s' bind failed: %s", buf, strerror(errno));
|
||||
if ((((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER) ||
|
||||
((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_SYSTEM)) &&
|
||||
(connect(svr->fd, (struct sockaddr *)&socket_unix,
|
||||
socket_unix_len) < 0) &&
|
||||
(unlink(buf) >= 0))
|
||||
goto start;
|
||||
else
|
||||
goto error_umask;
|
||||
socket_unix_len) < 0))
|
||||
{
|
||||
ERR("Local socket '%s' connect test failed: %s", buf, strerror(errno));
|
||||
if (unlink(buf) >= 0)
|
||||
goto start;
|
||||
else
|
||||
{
|
||||
ERR("Local socket '%s' removal failed: %s", buf, strerror(errno));
|
||||
goto error_umask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (listen(svr->fd, 4096) < 0)
|
||||
|
|
Loading…
Reference in New Issue