version 1.9.2.15, 2012/05/16 12:24:31
|
version 1.9.2.18, 2012/05/17 08:42:32
|
Line 82 txPacket(sched_task_t *task)
|
Line 82 txPacket(sched_task_t *task)
|
if (rpc->call_argc) { |
if (rpc->call_argc) { |
f = rpc_srv_getCall(s, ntohs(rpc->call_tag)); |
f = rpc_srv_getCall(s, ntohs(rpc->call_tag)); |
if (!f) { |
if (!f) { |
|
rpc_SetErr(EPROGUNAVAIL, "Function not found at RPC server"); |
rpc->call_argc ^= rpc->call_argc; |
rpc->call_argc ^= rpc->call_argc; |
rpc->call_rep.ret = RPC_ERROR(-1); |
rpc->call_rep.ret = RPC_ERROR(-1); |
rpc->call_rep.eno = RPC_ERROR(rpc_Errno); |
rpc->call_rep.eno = RPC_ERROR(rpc_Errno); |
Line 706 rpc_srv_initServer(u_int regProgID, u_char regProcID,
|
Line 707 rpc_srv_initServer(u_int regProgID, u_char regProcID,
|
else |
else |
netBuf = io_align(netBuf, 1); /* align netBuf length */ |
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)); |
srv = malloc(sizeof(rpc_srv_t)); |
if (!srv) { |
if (!srv) { |
LOGERR; |
LOGERR; |
Line 769 rpc_srv_initServer(u_int regProgID, u_char regProcID,
|
Line 778 rpc_srv_initServer(u_int regProgID, u_char regProcID,
|
goto err; |
goto err; |
} |
} |
|
|
|
rpc_register_srvPing(srv); |
|
|
return srv; |
return srv; |
err: /* error condition */ |
err: /* error condition */ |
close(srv->srv_server.cli_sock); |
close(srv->srv_server.cli_sock); |
Line 791 rpc_srv_endServer(rpc_srv_t ** __restrict psrv)
|
Line 802 rpc_srv_endServer(rpc_srv_t ** __restrict psrv)
|
register int i; |
register int i; |
rpc_func_t *f, *tmp; |
rpc_func_t *f, *tmp; |
|
|
if (!psrv || !*psrv) { | if (!psrv || !*psrv) |
rpc_SetErr(EINVAL, "Can`t destroy server because parameter is null!"); | |
return; |
return; |
} |
|
|
|
if (!(*psrv)->srv_blob.kill) |
if (!(*psrv)->srv_blob.kill) |
rpc_srv_endBLOBServer(*psrv); |
rpc_srv_endBLOBServer(*psrv); |
Line 880 rpc_srv_execCall(rpc_func_t * __restrict call, struct
|
Line 889 rpc_srv_execCall(rpc_func_t * __restrict call, struct
|
} |
} |
|
|
func = AIT_GET_LIKE(&call->func_name, rpc_callback_t); |
func = AIT_GET_LIKE(&call->func_name, rpc_callback_t); |
return func(call, ntohs(rpc->call_argc), args); | return func(call, rpc, args); |
} |
} |