version 1.3.2.1, 2011/08/29 23:26:56
|
version 1.3.2.2, 2011/09/03 12:58:49
|
Line 127 rpc_srv_blobMap(rpc_srv_t * __restrict srv, rpc_blob_t
|
Line 127 rpc_srv_blobMap(rpc_srv_t * __restrict srv, rpc_blob_t
|
rpc_SetErr(EINVAL, "Error:: invalid arguments ...\n"); |
rpc_SetErr(EINVAL, "Error:: invalid arguments ...\n"); |
return -1; |
return -1; |
} |
} |
|
if (blob->blob_data) { |
|
rpc_SetErr(EPERM, "Error:: already mmapped object found!\n"); |
|
return -1; |
|
} |
|
|
memset(szFName, 0, sizeof szFName); |
memset(szFName, 0, sizeof szFName); |
snprintf(szFName, sizeof szFName, BLOB_FILE, srv->srv_blob.dir, blob->blob_var); |
snprintf(szFName, sizeof szFName, BLOB_FILE, srv->srv_blob.dir, blob->blob_var); |
Line 297 rpc_cli_sendBLOB(rpc_cli_t * __restrict cli, ait_val_t
|
Line 301 rpc_cli_sendBLOB(rpc_cli_t * __restrict cli, ait_val_t
|
return -1; |
return -1; |
} |
} |
|
|
|
/* send BLOB to server */ |
for (ret = AIT_LEN(var), pos = data; ret > 0; ret -= len, pos += len) |
for (ret = AIT_LEN(var), pos = data; ret > 0; ret -= len, pos += len) |
if ((len = send(cli->cli_sock, pos, ret, 0)) == -1) { |
if ((len = send(cli->cli_sock, pos, ret, 0)) == -1) { |
LOGERR; |
LOGERR; |
Line 337 rpc_cli_sendBLOB(rpc_cli_t * __restrict cli, ait_val_t
|
Line 342 rpc_cli_sendBLOB(rpc_cli_t * __restrict cli, ait_val_t
|
* return: -1 error, 0 ok, 1 remote error |
* return: -1 error, 0 ok, 1 remote error |
*/ |
*/ |
int |
int |
rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, ait_val_t * __restrict var, void ** data) | rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, ait_val_t * __restrict var, void ** __restrict data) |
{ |
{ |
int ret, len; |
int ret, len; |
uint8_t *pos; |
uint8_t *pos; |
Line 369 rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, ait_val_t
|
Line 374 rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, ait_val_t
|
return -1; |
return -1; |
} |
} |
|
|
|
/* receive BLOB from server */ |
for (ret = AIT_LEN(var), pos = *data; ret > 0; ret -= len, pos += len) { |
for (ret = AIT_LEN(var), pos = *data; ret > 0; ret -= len, pos += len) { |
FD_ZERO(&fds); |
FD_ZERO(&fds); |
FD_SET(cli->cli_sock, &fds); |
FD_SET(cli->cli_sock, &fds); |