mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
gnutls: peek blocks until data is available.
This commit is contained in:
parent
c5dc4d1664
commit
b38c40b34e
@ -1,3 +1,7 @@
|
||||
2010-10-23 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||
|
||||
* gnutls.c (wgnutls_peek): Block until data is available.
|
||||
|
||||
2010-10-21 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||
|
||||
* retr.c (retrieve_url): Do not register HTML files twice.
|
||||
|
@ -184,13 +184,14 @@ wgnutls_peek (int fd, char *buf, int bufsize, void *arg)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (gnutls_record_check_pending (ctx->session)
|
||||
|| select_fd (fd, 0, WAIT_FOR_READ))
|
||||
ret = gnutls_record_recv (ctx->session, buf + offset,
|
||||
bufsize - offset);
|
||||
ret = gnutls_record_recv (ctx->session, buf + offset,
|
||||
bufsize - offset);
|
||||
}
|
||||
while (ret == GNUTLS_E_INTERRUPTED);
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (ret > 0)
|
||||
{
|
||||
memcpy (ctx->peekbuf + offset, buf + offset,
|
||||
|
Loading…
Reference in New Issue
Block a user