[Pkg-gnupg-commit] [libassuan] 235/437: Typo fix. flush full debug lines.
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:33:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit 18f5967ab001b9d9f82e1b43cec98e2c3e31b95b
Author: Werner Koch <wk at gnupg.org>
Date: Wed Oct 15 10:50:50 2008 +0000
Typo fix.
flush full debug lines.
---
src/ChangeLog | 5 +++++
src/assuan-logging.c | 5 +++++
src/assuan-socket-connect.c | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index f41e2c8..d114b47 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-15 Werner Koch <wk at g10code.com>
+
+ * assuan-logging.c (_assuan_log_printf): Flush if the format
+ string ends with a LF.
+
2008-09-01 Werner Koch <wk at g10code.com>
* assuan-io.c: Include time.h. Fixes bug#951.
diff --git a/src/assuan-logging.c b/src/assuan-logging.c
index fd40dcc..bd28eb1 100644
--- a/src/assuan-logging.c
+++ b/src/assuan-logging.c
@@ -112,6 +112,11 @@ _assuan_log_printf (const char *format, ...)
va_start (arg_ptr, format);
vfprintf (fp, format, arg_ptr );
va_end (arg_ptr);
+ /* If the log stream is a file, the output would be buffered. This
+ is bad for debugging, thus we flush the stream if FORMAT ends
+ with a LF. */
+ if (format && *format && format[strlen(format)-1] == '\n')
+ fflush (fp);
errno = save_errno;
}
diff --git a/src/assuan-socket-connect.c b/src/assuan-socket-connect.c
index 0b9bdbb..69d87f6 100644
--- a/src/assuan-socket-connect.c
+++ b/src/assuan-socket-connect.c
@@ -107,7 +107,7 @@ assuan_socket_connect_ext (assuan_context_t *r_ctx,
/* We require that the name starts with a slash, so that we
eventually can reuse this function for other socket types. To
- make things easier we allow an optional dirver prefix. */
+ make things easier we allow an optional driver prefix. */
s = name;
if (*s && s[1] == ':')
s += 2;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list