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:
parent
8c21960251
commit
6c94373609
5 changed files with 1885 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue