summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-05-14 18:19:57 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-05-14 18:41:48 +0200
commit9c571f01f7af8db1df238daa3136bf639247ac55 (patch)
tree47239ac644be863c2267f8ee16b2900b41a5c646 /src/lib/ecore_con
parentdbc6cbb953674217f4741330287d3d062a673151 (diff)
ecore_con: it doesn't make sense to get port on local protocol.
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/ecore_con.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 3e6ad7af54..dee26e1729 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -955,6 +955,15 @@ ecore_con_client_ip_get(const Ecore_Con *obj)
955EOLIAN static int 955EOLIAN static int
956_ecore_con_client_ecore_con_base_port_get(Eo *obj EINA_UNUSED, Ecore_Con_Client_Data *cl) 956_ecore_con_client_ecore_con_base_port_get(Eo *obj EINA_UNUSED, Ecore_Con_Client_Data *cl)
957{ 957{
958 Ecore_Con_Server_Data *sd = eo_data_scope_get(cl->host_server, ECORE_CON_SERVER_CLASS);
959
960 if (sd->type != ECORE_CON_REMOTE_TCP &&
961 sd->type != ECORE_CON_REMOTE_MCAST &&
962 sd->type != ECORE_CON_REMOTE_UDP &&
963 sd->type != ECORE_CON_REMOTE_BROADCAST &&
964 sd->type != ECORE_CON_REMOTE_NODELAY)
965 return -1;
966
958 if (cl->client_addr->sa_family == AF_INET) 967 if (cl->client_addr->sa_family == AF_INET)
959 return ((struct sockaddr_in *)cl->client_addr)->sin_port; 968 return ((struct sockaddr_in *)cl->client_addr)->sin_port;
960#ifdef HAVE_IPV6 969#ifdef HAVE_IPV6