aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorSrivardhan Hebbar <sri.hebbar@samsung.com>2015-03-06 16:26:24 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-03-06 20:19:21 +0100
commit9b1cdff941a429f13698184e02b37b2ad41fcaf4 (patch)
treecfec4789d4d01ed1e551ff4a70d98554f8667aa8 /src/lib/ecore_con
parenteina: add test cases for eina_xattr functions. (diff)
downloadefl-9b1cdff941a429f13698184e02b37b2ad41fcaf4.tar.gz
ecore_con: Not returning error if port is less than zero for local sockets.
Summary: If the socket is local, then there is no need to through error if the port is less than 0 (i.e., negetive). The behavior is same in _ecore_con_connector_eo_base_finalize funtion. So applied the same here. There is code in ecore_con_local.c to handle if port is less than zero for local sockets. In _ecore_con_connector_eo_base_finalize function, I've added a space just so that it shows difference in phabricator and would be easy for you to review. Reviewers: cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2089
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/ecore_con.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 914faa8934..20aa2a8983 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -398,9 +398,16 @@ _ecore_con_server_eo_base_finalize(Ecore_Con_Server *obj, Ecore_Con_Server_Data
servers = eina_list_append(servers, obj);
- if (!svr->name || (svr->port < 0))
+ if (!svr->name)
goto error;
+ EINA_SAFETY_ON_TRUE_GOTO(((type == ECORE_CON_REMOTE_TCP) ||
+ (type == ECORE_CON_REMOTE_NODELAY) ||
+ (type == ECORE_CON_REMOTE_CORK) ||
+ (type == ECORE_CON_REMOTE_UDP) ||
+ (type == ECORE_CON_REMOTE_BROADCAST)) &&
+ (svr->port < 0), error);
+
if (ecore_con_ssl_server_prepare(obj, compl_type & ECORE_CON_SSL))
goto error;
@@ -506,7 +513,7 @@ _ecore_con_connector_eo_base_finalize(Ecore_Con_Server *obj, void *pd EINA_UNUSE
(type == ECORE_CON_REMOTE_CORK) ||
(type == ECORE_CON_REMOTE_UDP) ||
(type == ECORE_CON_REMOTE_BROADCAST)) &&
- (svr->port < 0), error);
+ (svr->port < 0), error);
if ((type == ECORE_CON_LOCAL_USER) ||
(type == ECORE_CON_LOCAL_SYSTEM) ||