version 1.5, 2011/09/07 07:24:21
|
version 1.5.2.1, 2011/09/07 08:56:32
|
Line 338 rpc_cli_execCall(rpc_cli_t *cli, const char *csModule,
|
Line 338 rpc_cli_execCall(rpc_cli_t *cli, const char *csModule,
|
|
|
/* prepare RPC call */ |
/* prepare RPC call */ |
rpc = (struct tagRPCCall*) buf; |
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_argc = in_vars ? io_arraySize(in_vars) : 0; |
rpc->call_tag = crcFletcher16((u_short*) str, sizeof str / 2); |
rpc->call_tag = crcFletcher16((u_short*) str, sizeof str / 2); |
rpc->call_hash = hash_fnv((char*) str, sizeof str); |
rpc->call_hash = hash_fnv((char*) str, sizeof str); |
Line 396 rpc_cli_execCall(rpc_cli_t *cli, const char *csModule,
|
Line 396 rpc_cli_execCall(rpc_cli_t *cli, const char *csModule,
|
} else |
} else |
rrpc = (struct tagRPCRet*) buf; |
rrpc = (struct tagRPCRet*) buf; |
/* check RPC packet session info */ |
/* 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"); |
rpc_SetErr(ERPCMISMATCH, "Error:: get invalid RPC session ...\n"); |
free(buf); |
free(buf); |
return -5; |
return -5; |