Skip to content

Commit

Permalink
More fixes to I/O unification stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lpereira committed May 23, 2024
1 parent b379e13 commit 842d001
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/lwan-io-wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ ssize_t lwan_writev_fd(struct lwan_request *request,
curr_iov++;
}

iov[curr_iov].iov_base = (char *)iov[curr_iov].iov_base + written;
iov[curr_iov].iov_len -= (size_t)written;

if (curr_iov == iov_count)
return total_written;

iov[curr_iov].iov_base = (char *)iov[curr_iov].iov_base + written;
iov[curr_iov].iov_len -= (size_t)written;
}

lwan_request_await_read(request, fd);
Expand Down Expand Up @@ -134,12 +134,12 @@ ssize_t lwan_readv_fd(struct lwan_request *request,
curr_iov++;
}

if (curr_iov == iov_count)
return total_bytes_read;

iov[curr_iov].iov_base =
(char *)iov[curr_iov].iov_base + bytes_read;
iov[curr_iov].iov_len -= (size_t)bytes_read;

if (curr_iov == iov_count)
return total_bytes_read;
}

lwan_request_await_read(request, fd);
Expand Down

0 comments on commit 842d001

Please sign in to comment.