forked from enlightenment/efl
ecore_con: restore ability for negative port on local connection.
Thanks make check.
This commit is contained in:
parent
3f8c282544
commit
fb3e49d66d
|
@ -1671,15 +1671,18 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
|
||||||
Eo *loop;
|
Eo *loop;
|
||||||
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
|
||||||
/* The allowable port number is an unsigned 16-bit integer, so 1-65535, 0 is reserved */
|
|
||||||
if ((port < 0) || (port > 65535))
|
type = compl_type & ECORE_CON_TYPE;
|
||||||
|
|
||||||
|
/* The allowable port number is an unsigned 16-bit integer for remote connection, so 1-65535, 0 is reserved */
|
||||||
|
if (((type == ECORE_CON_REMOTE_TCP) || (type == ECORE_CON_REMOTE_NODELAY) || (type == ECORE_CON_REMOTE_CORK) ||
|
||||||
|
(type == ECORE_CON_REMOTE_UDP) || (type == ECORE_CON_REMOTE_MCAST)) &&
|
||||||
|
(port < 0) || (port > 65535))
|
||||||
{
|
{
|
||||||
ERR("Port %i invalid (0 <= port <= 65535)", port);
|
ERR("Port %i invalid (0 <= port <= 65535)", port);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
type = compl_type & ECORE_CON_TYPE;
|
|
||||||
|
|
||||||
loop = efl_main_loop_get();
|
loop = efl_main_loop_get();
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(loop, NULL);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(loop, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue