summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2014-12-05 13:19:49 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2014-12-05 13:20:13 -0500
commit08e1f2f4f367d16d14263286998aed24f0e6267b (patch)
tree348bca758c1af491b1217fb2e619446dbb027c41
parent9cd2d614e954b2f697e887bfd90397c4ab5fc4e1 (diff)
ecore-con now prints error messages when local socket creation fails
-rw-r--r--src/lib/ecore_con/ecore_con_local.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/ecore_con/ecore_con_local.c b/src/lib/ecore_con/ecore_con_local.c
index 0d74ea0..2992058 100644
--- a/src/lib/ecore_con/ecore_con_local.c
+++ b/src/lib/ecore_con/ecore_con_local.c
@@ -371,14 +371,21 @@ start:
371 371
372 if (bind(svr->fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) 372 if (bind(svr->fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0)
373 { 373 {
374 ERR("Local socket '%s' bind failed: %s", buf, strerror(errno));
374 if ((((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER) || 375 if ((((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER) ||
375 ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_SYSTEM)) && 376 ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_SYSTEM)) &&
376 (connect(svr->fd, (struct sockaddr *)&socket_unix, 377 (connect(svr->fd, (struct sockaddr *)&socket_unix,
377 socket_unix_len) < 0) && 378 socket_unix_len) < 0))
378 (unlink(buf) >= 0)) 379 {
379 goto start; 380 ERR("Local socket '%s' connect test failed: %s", buf, strerror(errno));
380 else 381 if (unlink(buf) >= 0)
381 goto error_umask; 382 goto start;
383 else
384 {
385 ERR("Local socket '%s' removal failed: %s", buf, strerror(errno));
386 goto error_umask;
387 }
388 }
382 } 389 }
383 390
384 if (listen(svr->fd, 4096) < 0) 391 if (listen(svr->fd, 4096) < 0)