1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Added http.c from 1.4.

Added support for estream and gnutls.
This commit is contained in:
Werner Koch 2006-08-11 11:04:38 +00:00
parent 8c21960251
commit 6c94373609
5 changed files with 1885 additions and 12 deletions

View file

@ -559,7 +559,7 @@ static es_cookie_io_functions_t estream_functions_mem =
es_func_mem_read,
es_func_mem_write,
es_func_mem_seek,
es_func_mem_destroy,
es_func_mem_destroy
};
/* Implementation of fd I/O. */
@ -1402,16 +1402,19 @@ es_writen (estream_t ES__RESTRICT stream,
if (! (stream->flags & ES_FLAG_WRITING))
{
/* Switching to writing mode -> discard input data and seek to
position at which reading has stopped. */
err = es_seek (stream, 0, SEEK_CUR, NULL);
if (err)
{
if (errno == ESPIPE)
err = 0;
else
goto out;
}
position at which reading has stopped. We can do this only
if a seek function has been registered. */
if (stream->intern->func_seek)
{
err = es_seek (stream, 0, SEEK_CUR, NULL);
if (err)
{
if (errno == ESPIPE)
err = 0;
else
goto out;
}
}
}
switch (stream->intern->strategy)