--- libaitrpc/src/srv.c 2015/06/24 22:27:58 1.26.2.1 +++ libaitrpc/src/srv.c 2015/06/24 22:39:32 1.26.2.2 @@ -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.2 2015/06/24 22:39:32 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 (!e_gethostbyname(csHost, Port, &sa)) - return NULL; if (!Port) Port = RPC_DEFPORT; + if (!e_gethostbyname(csHost, Port, &sa)) + return NULL; if (!proto) proto = SOCK_STREAM; if (netBuf < RPC_MIN_BUFSIZ)