--- libaitrpc/src/srv.c 2012/05/16 12:24:31 1.9.2.15 +++ libaitrpc/src/srv.c 2012/05/16 13:17:51 1.9.2.16 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.9.2.15 2012/05/16 12:24:31 misho Exp $ +* $Id: srv.c,v 1.9.2.16 2012/05/16 13:17:51 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -706,6 +706,14 @@ rpc_srv_initServer(u_int regProgID, u_char regProcID, else netBuf = io_align(netBuf, 1); /* align netBuf length */ +#ifdef HAVE_SRANDOMDEV + srandomdev(); +#else + time_t tim; + + srandom((time(&tim) ^ getpid())); +#endif + srv = malloc(sizeof(rpc_srv_t)); if (!srv) { LOGERR; @@ -791,10 +799,8 @@ rpc_srv_endServer(rpc_srv_t ** __restrict psrv) register int i; rpc_func_t *f, *tmp; - if (!psrv || !*psrv) { - rpc_SetErr(EINVAL, "Can`t destroy server because parameter is null!"); + if (!psrv || !*psrv) return; - } if (!(*psrv)->srv_blob.kill) rpc_srv_endBLOBServer(*psrv);