--- libaitrpc/src/cli.c 2011/09/07 07:24:21 1.5 +++ libaitrpc/src/cli.c 2011/09/07 08:56:32 1.5.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: cli.c,v 1.5 2011/09/07 07:24:21 misho Exp $ +* $Id: cli.c,v 1.5.2.1 2011/09/07 08:56:32 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -338,7 +338,7 @@ rpc_cli_execCall(rpc_cli_t *cli, const char *csModule, /* prepare RPC call */ rpc = (struct tagRPCCall*) buf; - memcpy(&rpc->call_session, cli->cli_parent, sizeof rpc->call_session); + rpc_addPktSession(&rpc->call_session, cli->cli_parent); rpc->call_argc = in_vars ? io_arraySize(in_vars) : 0; rpc->call_tag = crcFletcher16((u_short*) str, sizeof str / 2); rpc->call_hash = hash_fnv((char*) str, sizeof str); @@ -396,7 +396,7 @@ rpc_cli_execCall(rpc_cli_t *cli, const char *csModule, } else rrpc = (struct tagRPCRet*) buf; /* check RPC packet session info */ - if (memcmp(&rrpc->ret_session, cli->cli_parent, sizeof rrpc->ret_session)) { + if (rpc_chkPktSession(&rrpc->ret_session, cli->cli_parent)) { rpc_SetErr(ERPCMISMATCH, "Error:: get invalid RPC session ...\n"); free(buf); return -5;