--- libaitrpc/src/srv.c 2015/06/24 22:27:58 1.26.2.1 +++ libaitrpc/src/srv.c 2015/06/24 22:44:24 1.26.2.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.26.2.1 2015/06/24 22:27:58 misho Exp $ +* $Id: srv.c,v 1.26.2.3 2015/06/24 22:44:24 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -1579,10 +1579,10 @@ rpc_srv_initServer(u_char InstID, int concurentClients rpc_SetErr(EINVAL, "Invalid parameters can`t init RPC server"); return NULL; } + if (!Port && proto < SOCK_RAW) + Port = RPC_DEFPORT; if (!e_gethostbyname(csHost, Port, &sa)) return NULL; - if (!Port) - Port = RPC_DEFPORT; if (!proto) proto = SOCK_STREAM; if (netBuf < RPC_MIN_BUFSIZ)