diff options
author | Werner Koch <[email protected]> | 2018-07-12 07:17:52 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2018-07-12 07:19:23 +0000 |
commit | bd5bcd2dd19ef0b1c3d33a3a388b537ba08a4eb6 (patch) | |
tree | 07ecffe1ec6fcdc8da90ea01b326ec1ff89ab17f | |
parent | build: Use AX_CC_FOR_BUILD and EXEEXT. (diff) | |
download | libgpg-error-bd5bcd2dd19ef0b1c3d33a3a388b537ba08a4eb6.tar.gz libgpg-error-bd5bcd2dd19ef0b1c3d33a3a388b537ba08a4eb6.zip |
estream: Always propagate flush event to cookie functions.
* src/estream.c (flush_stream): Always call cookie's flush func.
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | src/estream.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/estream.c b/src/estream.c index a1cc62e..8ad664e 100644 --- a/src/estream.c +++ b/src/estream.c @@ -1930,14 +1930,15 @@ flush_stream (estream_t stream) stream->intern->offset += stream->data_offset; stream->data_offset = 0; stream->data_flushed = 0; - - /* Propagate flush event. */ - (*func_write) (stream->intern->cookie, NULL, 0); } } else err = 0; + /* Always propagate flush event in case gpgrt_fflush was called + * explictly to do flush buffers in caller's cookie functions. */ + (*func_write) (stream->intern->cookie, NULL, 0); + out: if (err && errno != EAGAIN) |