--- libaitrpc/src/cli.c 2011/07/14 02:36:57 1.2.2.2 +++ libaitrpc/src/cli.c 2011/07/14 02:39:52 1.2.2.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: cli.c,v 1.2.2.2 2011/07/14 02:36:57 misho Exp $ +* $Id: cli.c,v 1.2.2.3 2011/07/14 02:39:52 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -344,8 +344,8 @@ rpc_cli_execCall(rpc_cli_t *cli, const char *csModule, if (ret < sizeof(struct tagRPCRet)) { rpc_SetErr(EMSGSIZE, "Error:: too short RPC packet ...\n"); return -4; - } - rrpc = (struct tagRPCRet*) buf; + } else + rrpc = (struct tagRPCRet*) buf; /* check RPC packet session info */ if (memcmp(&rrpc->ret_session, cli->cli_parent, sizeof rrpc->ret_session)) { rpc_SetErr(EINVAL, "Error:: get invalid RPC session ...\n");