--- libaitrpc/src/srv.c 2012/05/16 13:17:51 1.9.2.16 +++ libaitrpc/src/srv.c 2012/05/17 08:42:32 1.9.2.18 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.9.2.16 2012/05/16 13:17:51 misho Exp $ +* $Id: srv.c,v 1.9.2.18 2012/05/17 08:42:32 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -82,6 +82,7 @@ txPacket(sched_task_t *task) if (rpc->call_argc) { f = rpc_srv_getCall(s, ntohs(rpc->call_tag)); if (!f) { + rpc_SetErr(EPROGUNAVAIL, "Function not found at RPC server"); rpc->call_argc ^= rpc->call_argc; rpc->call_rep.ret = RPC_ERROR(-1); rpc->call_rep.eno = RPC_ERROR(rpc_Errno); @@ -777,6 +778,8 @@ rpc_srv_initServer(u_int regProgID, u_char regProcID, goto err; } + rpc_register_srvPing(srv); + return srv; err: /* error condition */ close(srv->srv_server.cli_sock); @@ -886,5 +889,5 @@ rpc_srv_execCall(rpc_func_t * __restrict call, struct } func = AIT_GET_LIKE(&call->func_name, rpc_callback_t); - return func(call, ntohs(rpc->call_argc), args); + return func(call, rpc, args); }