version 1.25, 2015/05/18 15:09:59
|
version 1.25.2.2, 2015/06/28 21:52:26
|
Line 223 rpc_cli_openClient(u_char InstID, int netBuf, const ch
|
Line 223 rpc_cli_openClient(u_char InstID, int netBuf, const ch
|
LOGERR; |
LOGERR; |
goto err; |
goto err; |
} |
} |
|
if (cli->cli_id == SOCK_DGRAM) { |
|
sockaddr_t sa2; |
|
|
|
if (!e_gethostbyname(csHost, 0, &sa2)) |
|
goto err; |
|
if (bind(cli->cli_sock, &sa2.sa, sa2.sa.sa_len) == -1) { |
|
LOGERR; |
|
goto err; |
|
} |
|
} |
|
|
fcntl(cli->cli_sock, F_SETFL, fcntl(cli->cli_sock, F_GETFL) | O_NONBLOCK); |
fcntl(cli->cli_sock, F_SETFL, fcntl(cli->cli_sock, F_GETFL) | O_NONBLOCK); |
return cli; |
return cli; |
err: |
err: |
Line 359 rpc_pkt_Receive(int sock, int type, sockaddr_t * __res
|
Line 369 rpc_pkt_Receive(int sock, int type, sockaddr_t * __res
|
|
|
if (ret > 0) { |
if (ret > 0) { |
rpc = (struct tagRPCCall*) AIT_GET_BUF(pkt); |
rpc = (struct tagRPCCall*) AIT_GET_BUF(pkt); |
|
if (ret < ntohl(rpc->call_len)) |
|
continue; |
|
|
/* check for loop request */ |
/* check for loop request */ |
if (!(rpc->call_io & RPC_ACK)) |
if (!(rpc->call_io & RPC_ACK)) |