version 1.2, 2011/05/02 23:12:08
|
version 1.2.4.1, 2011/08/19 09:32:38
|
Line 216 rpc_srv_sendBLOB(rpc_cli_t * __restrict cli, rpc_blob_
|
Line 216 rpc_srv_sendBLOB(rpc_cli_t * __restrict cli, rpc_blob_
|
} |
} |
|
|
for (ret = blob->blob_len, pos = blob->blob_data; ret > 0; ret -= len, pos += len) |
for (ret = blob->blob_len, pos = blob->blob_data; ret > 0; ret -= len, pos += len) |
if ((len = send(cli->cli_sock, pos, ret > BLOBSIZ ? BLOBSIZ : ret, 0)) == -1) { | if ((len = write(cli->cli_sock, pos, ret > BLOBSIZ ? BLOBSIZ : ret)) == -1) { |
LOGERR; |
LOGERR; |
return -1; |
return -1; |
} |
} |
Line 252 rpc_srv_recvBLOB(rpc_cli_t * __restrict cli, rpc_blob_
|
Line 252 rpc_srv_recvBLOB(rpc_cli_t * __restrict cli, rpc_blob_
|
return -1; |
return -1; |
} |
} |
|
|
if ((len = recv(cli->cli_sock, pos, BLOBSIZ, 0)) == -1) { | if ((len = read(cli->cli_sock, pos, BLOBSIZ)) == -1) { |
LOGERR; |
LOGERR; |
return -1; |
return -1; |
} |
} |
Line 289 rpc_cli_sendBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
Line 289 rpc_cli_sendBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
hdr.hdr_var = 0; |
hdr.hdr_var = 0; |
hdr.hdr_ret = 0; |
hdr.hdr_ret = 0; |
hdr.hdr_len = var->val_len; |
hdr.hdr_len = var->val_len; |
if (send(cli->cli_sock, &hdr, sizeof hdr, 0) == -1) { | if (write(cli->cli_sock, &hdr, sizeof hdr) == -1) { |
LOGERR; |
LOGERR; |
return -1; |
return -1; |
} |
} |
|
|
for (ret = var->val_len, pos = data; ret > 0; ret -= len, pos += len) |
for (ret = var->val_len, pos = data; ret > 0; ret -= len, pos += len) |
if ((len = send(cli->cli_sock, pos, ret > BLOBSIZ ? BLOBSIZ : ret, 0)) == -1) { | if ((len = write(cli->cli_sock, pos, ret > BLOBSIZ ? BLOBSIZ : ret)) == -1) { |
LOGERR; |
LOGERR; |
return -1; |
return -1; |
} |
} |
Line 310 rpc_cli_sendBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
Line 310 rpc_cli_sendBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
rpc_SetErr(ETIMEDOUT, "Error:: Timeout reached! Server not responde ...\n"); |
rpc_SetErr(ETIMEDOUT, "Error:: Timeout reached! Server not responde ...\n"); |
return -1; |
return -1; |
} |
} |
if (recv(cli->cli_sock, &hdr, sizeof hdr, 0) == -1) { | if (read(cli->cli_sock, &hdr, sizeof hdr) == -1) { |
LOGERR; |
LOGERR; |
return -1; |
return -1; |
} |
} |
Line 359 rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
Line 359 rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
hdr.hdr_var = (uint32_t) RPC_GET_BLOB(var); |
hdr.hdr_var = (uint32_t) RPC_GET_BLOB(var); |
hdr.hdr_ret = 0; |
hdr.hdr_ret = 0; |
hdr.hdr_len = 0; |
hdr.hdr_len = 0; |
if (send(cli->cli_sock, &hdr, sizeof hdr, 0) == -1) { | if (write(cli->cli_sock, &hdr, sizeof hdr) == -1) { |
LOGERR; |
LOGERR; |
free(*data); |
free(*data); |
*data = NULL; |
*data = NULL; |
Line 377 rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
Line 377 rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
return -1; |
return -1; |
} |
} |
|
|
if ((len = recv(cli->cli_sock, pos, BLOBSIZ, 0)) == -1) { | if ((len = read(cli->cli_sock, pos, BLOBSIZ)) == -1) { |
LOGERR; |
LOGERR; |
free(*data); |
free(*data); |
*data = NULL; |
*data = NULL; |
Line 399 rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
Line 399 rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
*data = NULL; |
*data = NULL; |
return -1; |
return -1; |
} |
} |
if (recv(cli->cli_sock, &hdr, sizeof hdr, 0) == -1) { | if (read(cli->cli_sock, &hdr, sizeof hdr) == -1) { |
LOGERR; |
LOGERR; |
free(*data); |
free(*data); |
*data = NULL; |
*data = NULL; |
Line 440 rpc_cli_delBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
Line 440 rpc_cli_delBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
hdr.hdr_var = (uint32_t) RPC_GET_BLOB(var); |
hdr.hdr_var = (uint32_t) RPC_GET_BLOB(var); |
hdr.hdr_ret = 0; |
hdr.hdr_ret = 0; |
hdr.hdr_len = 0; |
hdr.hdr_len = 0; |
if (send(cli->cli_sock, &hdr, sizeof hdr, 0) == -1) { | if (write(cli->cli_sock, &hdr, sizeof hdr) == -1) { |
LOGERR; |
LOGERR; |
return -1; |
return -1; |
} |
} |
Line 455 rpc_cli_delBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
Line 455 rpc_cli_delBLOB(rpc_cli_t * __restrict cli, rpc_val_t
|
rpc_SetErr(ETIMEDOUT, "Error:: Timeout reached! Server not responde ...\n"); |
rpc_SetErr(ETIMEDOUT, "Error:: Timeout reached! Server not responde ...\n"); |
return -1; |
return -1; |
} |
} |
if (recv(cli->cli_sock, &hdr, sizeof hdr, 0) == -1) { | if (read(cli->cli_sock, &hdr, sizeof hdr) == -1) { |
LOGERR; |
LOGERR; |
return -1; |
return -1; |
} |
} |