summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
a357a93)
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I60be191866d20721951ad22f571a2a3275511e12
vlsh = ldp_fd_to_vlsh (fd);
if (vlsh != VLS_INVALID_HANDLE)
{
vlsh = ldp_fd_to_vlsh (fd);
if (vlsh != VLS_INVALID_HANDLE)
{
+ for (i = 0; i < iovcnt; ++i)
- for (i = 0; i < iovcnt; ++i)
+ rv = vls_read (vlsh, iov[i].iov_base, iov[i].iov_len);
+ if (rv <= 0)
+ break;
+ else
- rv = vls_read (vlsh, iov[i].iov_base, iov[i].iov_len);
- if (rv < 0)
+ total += rv;
+ if (rv < iov[i].iov_len)
- else
- {
- total += rv;
- if (rv < iov[i].iov_len)
- break;
- }
- while ((rv >= 0) && (total == 0));
-
- if (rv < 0)
+ if (rv < 0 && total == 0)
{
errno = -rv;
size = -1;
{
errno = -rv;
size = -1;
static inline int
vcl_session_closing_error (vcl_session_t * s)
{
static inline int
vcl_session_closing_error (vcl_session_t * s)
{
- return s->session_state == STATE_DISCONNECT
- ? VPPCOM_ECONNRESET : VPPCOM_ECONNABORTED;
+ /* Return 0 on closing sockets */
+ return s->session_state == STATE_DISCONNECT ? VPPCOM_ECONNRESET : 0;