diff options
author | Werner Koch <[email protected]> | 2008-10-15 10:50:50 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2008-10-15 10:50:50 +0000 |
commit | 18f5967ab001b9d9f82e1b43cec98e2c3e31b95b (patch) | |
tree | 9b7235f2835b244052e23d21729b801a680f3bac | |
parent | check for nanosleep (diff) | |
download | libassuan-18f5967ab001b9d9f82e1b43cec98e2c3e31b95b.tar.gz libassuan-18f5967ab001b9d9f82e1b43cec98e2c3e31b95b.zip |
Typo fix.
flush full debug lines.
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/assuan-logging.c | 5 | ||||
-rw-r--r-- | src/assuan-socket-connect.c | 2 |
3 files changed, 11 insertions, 1 deletions
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 <[email protected]> + + * assuan-logging.c (_assuan_log_printf): Flush if the format + string ends with a LF. + 2008-09-01 Werner Koch <[email protected]> * 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; |