[svn] assuan - r290 - trunk/src

svn author wk cvs at cvs.gnupg.org
Wed Oct 15 12:50:50 CEST 2008


Author: wk
Date: 2008-10-15 12:50:50 +0200 (Wed, 15 Oct 2008)
New Revision: 290

Modified:
   trunk/src/ChangeLog
   trunk/src/assuan-logging.c
   trunk/src/assuan-socket-connect.c
Log:
Typo fix.
flush full debug lines.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2008-09-01 10:39:44 UTC (rev 289)
+++ trunk/src/ChangeLog	2008-10-15 10:50:50 UTC (rev 290)
@@ -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.

Modified: trunk/src/assuan-logging.c
===================================================================
--- trunk/src/assuan-logging.c	2008-09-01 10:39:44 UTC (rev 289)
+++ trunk/src/assuan-logging.c	2008-10-15 10:50:50 UTC (rev 290)
@@ -112,6 +112,11 @@
   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;
 }
 

Modified: trunk/src/assuan-socket-connect.c
===================================================================
--- trunk/src/assuan-socket-connect.c	2008-09-01 10:39:44 UTC (rev 289)
+++ trunk/src/assuan-socket-connect.c	2008-10-15 10:50:50 UTC (rev 290)
@@ -107,7 +107,7 @@
 
   /* 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;




More information about the Gnupg-commits mailing list