--- libaitrpc/src/blobcli.c 2015/07/02 22:28:15 1.2 +++ libaitrpc/src/blobcli.c 2024/03/20 17:32:31 1.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: blobcli.c,v 1.2 2015/07/02 22:28:15 misho Exp $ +* $Id: blobcli.c,v 1.3 2024/03/20 17:32:31 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2015 +Copyright 2004 - 2024 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -79,7 +79,7 @@ rpc_cli_sendBLOB(rpc_cli_t * __restrict cli, ait_val_t /* send SET request */ pfd.fd = cli->cli_sock; pfd.events = POLLOUT; - if ((ret = poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000)) == -1 || + if (poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000) == -1 || pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) { LOGERR; return -1; @@ -165,7 +165,7 @@ rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, ait_val_t /* send GET request */ pfd.fd = cli->cli_sock; pfd.events = POLLOUT; - if ((ret = poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000)) == -1 || + if (poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000) == -1 || pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) { LOGERR; e_free(*data); @@ -182,7 +182,7 @@ rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, ait_val_t /* receive BLOB from server */ pfd.events = POLLIN | POLLPRI; for (ret = AIT_LEN(var), pos = *data; ret > 0; ret -= len, pos += len) { - if ((len = poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000)) < 1 || + if (poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000) < 1 || pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) { LOGERR; e_free(*data); @@ -256,7 +256,7 @@ rpc_cli_delBLOB(rpc_cli_t * __restrict cli, ait_val_t /* send UNSET request */ pfd.fd = cli->cli_sock; pfd.events = POLLOUT; - if ((ret = poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000)) == -1 || + if (poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000) == -1 || pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) { LOGERR; return -1;