--- libaitrpc/src/srv.c 2012/03/12 15:04:38 1.6.2.2 +++ libaitrpc/src/srv.c 2012/03/12 15:07:58 1.6.2.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.6.2.2 2012/03/12 15:04:38 misho Exp $ +* $Id: srv.c,v 1.6.2.3 2012/03/12 15:07:58 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -784,6 +784,8 @@ rpc_srv_loopServer(rpc_srv_t * __restrict srv) return -1; } + tv.tv_sec = srv->srv_session.sess_timeout; + /* activate BLOB server worker if srv->srv_blob.state == enable */ rpc_srv_execBLOBServer(srv); @@ -795,6 +797,7 @@ rpc_srv_loopServer(rpc_srv_t * __restrict srv) pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + /* main rpc loop */ while (srv->srv_kill != kill) { for (c = srv->srv_clients, i = 0; i < srv->srv_numcli && c; i++, c++) if (!c->cli_sa.sa.sa_family) @@ -826,6 +829,7 @@ rpc_srv_loopServer(rpc_srv_t * __restrict srv) } else c->cli_parent = srv; + /* spawn rpc client dispatcher */ if (pthread_create(&c->cli_tid, &attr, rpc_srv_dispatchCall, c)) { LOGERR; continue;