version 1.12.2.1, 2012/11/19 12:43:21
|
version 1.12.2.2, 2012/11/19 14:51:52
|
Line 270 rpc_cli_execCall(rpc_cli_t *cli, int noreply, u_short
|
Line 270 rpc_cli_execCall(rpc_cli_t *cli, int noreply, u_short
|
if (out_vars) |
if (out_vars) |
*out_vars = NULL; |
*out_vars = NULL; |
|
|
|
memset(&sa, 0, sizeof sa); |
|
|
/* prepare RPC call */ |
/* prepare RPC call */ |
rpc = (struct tagRPCCall*) buf; |
rpc = (struct tagRPCCall*) buf; |
rpc_addPktSession(&rpc->call_session, cli->cli_parent); |
rpc_addPktSession(&rpc->call_session, cli->cli_parent); |
Line 334 rpc_cli_execCall(rpc_cli_t *cli, int noreply, u_short
|
Line 336 rpc_cli_execCall(rpc_cli_t *cli, int noreply, u_short
|
do { |
do { |
if ((ret = poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000)) < 1 || |
if ((ret = poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000)) < 1 || |
pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) { |
pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) { |
if (ret) | if (ret) { |
LOGERR; |
LOGERR; |
else { | } else { |
if (wlen++ < 7) |
if (wlen++ < 7) |
continue; |
continue; |
else |
else |
rpc_SetErr(ETIMEDOUT, "Timeout, no answer from RPC server"); |
rpc_SetErr(ETIMEDOUT, "Timeout, no answer from RPC server"); |
} |
} |
|
|
return -1; |
return -1; |
} |
} |
} while (0); | |
do { | |
memset(buf, 0, AIT_LEN(&cli->cli_buf)); |
memset(buf, 0, AIT_LEN(&cli->cli_buf)); |
if (cli->cli_id == SOCK_STREAM) |
if (cli->cli_id == SOCK_STREAM) |
ret = recv(cli->cli_sock, buf, AIT_LEN(&cli->cli_buf), 0); |
ret = recv(cli->cli_sock, buf, AIT_LEN(&cli->cli_buf), 0); |
Line 361 rpc_cli_execCall(rpc_cli_t *cli, int noreply, u_short
|
Line 363 rpc_cli_execCall(rpc_cli_t *cli, int noreply, u_short
|
} |
} |
return -1; |
return -1; |
} |
} |
/* check for response from known address */ | |
if (io_addrcmp(&cli->cli_sa, &sa, 42)) { | if (cli->cli_id == SOCK_DGRAM) { |
rpc_SetErr(ERPCMISMATCH, "Received RPC response from unknown address"); | /* check for response from known address */ |
continue; | if (io_addrcmp(&cli->cli_sa, &sa, 42)) { |
| rpc_SetErr(ERPCMISMATCH, "Received RPC response from unknown address"); |
| continue; |
| } |
} |
} |
} while (0); |
} while (0); |
if (ret < sizeof(struct tagRPCCall)) { |
if (ret < sizeof(struct tagRPCCall)) { |