summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/array
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2014-01-29 12:48:19 +0000
committerdes <des@FreeBSD.org>2014-01-29 12:48:19 +0000
commit3dc25be505d107528cf27e8a95bfb0b2f10723a7 (patch)
tree71f230a25a643d802e1398567dd0f1028de6ca8b /contrib/libc++/include/array
parent1e80aa6531a52a6fd31d4fe1cd65cc85dad5be89 (diff)
downloadFreeBSD-src-3dc25be505d107528cf27e8a95bfb0b2f10723a7.zip
FreeBSD-src-3dc25be505d107528cf27e8a95bfb0b2f10723a7.tar.gz
r261230 broke the cases where the amount of data to be read is not
known in advance, or where the caller doesn't care and just keeps reading until it hits EOF. In fetch_read(): the socket is non-blocking, so read() will return 0 on EOF, and -1 (errno == EAGAIN) when the connection is still open but there is no data waiting. In the first case, we should immediately return 0. The EINTR case was also broken, although not in a way that matters. In fetch_writev(): use timersub() and timercmp() as in fetch_read(). In http_fillbuf(): set errno to a sensible value when an invalid chunk header is encountered. In http_readfn(): as in fetch_read(), a zero return from down the stack indicates EOF, not an error. Furthermore, when io->error is EINTR, clear it (but no errno) before returning so the caller can retry after dealing with the interrupt. MFC after: 3 days
Diffstat (limited to 'contrib/libc++/include/array')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud