1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-10-05 19:18:01 +08:00

fix bug on partial response

This commit is contained in:
stefanocasazza 2015-02-05 16:43:56 +01:00
parent 424c0fc222
commit 840efebf14
3 changed files with 4 additions and 3 deletions

View File

@ -429,8 +429,10 @@ error: U_INTERNAL_DUMP("errno = %d", errno)
U_INTERNAL_ASSERT_MAJOR(byte_written, 0) U_INTERNAL_ASSERT_MAJOR(byte_written, 0)
if (byte_written < (int)count) if ((uint32_t)value < count)
{ {
count -= value;
while ((size_t)value >= iov[idx].iov_len) while ((size_t)value >= iov[idx].iov_len)
{ {
value -= iov[idx].iov_len; value -= iov[idx].iov_len;
@ -451,7 +453,6 @@ error: U_INTERNAL_DUMP("errno = %d", errno)
iov += idx; iov += idx;
iovcnt -= idx; iovcnt -= idx;
count -= value;
timeoutMS = 0; timeoutMS = 0;
goto write; goto write;

View File

@ -1 +1 @@
B0BC B0D1

Binary file not shown.