diff options
author | Werner Koch <[email protected]> | 2010-03-11 12:34:11 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2010-03-11 12:34:11 +0000 |
commit | 37870234a195fb76f36284ac4bdb5dc172078724 (patch) | |
tree | f65b4c42925edb20ff4149a977d12a4d31d432a0 /common/estream.c | |
parent | Change logging to use estream. The makes logging to a socket also (diff) | |
download | gnupg-37870234a195fb76f36284ac4bdb5dc172078724.tar.gz gnupg-37870234a195fb76f36284ac4bdb5dc172078724.zip |
Use a custom log handler for libassuan.
Diffstat (limited to '')
-rw-r--r-- | common/estream.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/estream.c b/common/estream.c index dfa2de4aa..32567e631 100644 --- a/common/estream.c +++ b/common/estream.c @@ -2028,6 +2028,8 @@ es_set_buffering (estream_t ES__RESTRICT stream, buffer_new = buffer; else { + if (!size) + size = BUFSIZ; buffer_new = mem_alloc (size); if (! buffer_new) { @@ -3207,8 +3209,8 @@ es_setvbuf (estream_t ES__RESTRICT stream, { int err; - if (((type == _IOFBF) || (type == _IOLBF) || (type == _IONBF)) - && (! ((! size) && (type != _IONBF)))) + if ((type == _IOFBF || type == _IOLBF || type == _IONBF) + && (!buf || size || type == _IONBF)) { ESTREAM_LOCK (stream); err = es_set_buffering (stream, buf, type, size); |