[svn] GpgEX - r48 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Tue Feb 5 01:16:03 CET 2008
Author: marcus
Date: 2008-02-05 01:16:02 +0100 (Tue, 05 Feb 2008)
New Revision: 48
Modified:
trunk/src/ChangeLog
trunk/src/client.cc
trunk/src/debug.h
trunk/src/main.cc
Log:
2008-02-05 Marcus Brinkmann <marcus at g10code.de>
* debug.h: Include <stdio.h>.
(debug_file, debug_flags): New prototypes.
* main.cc (debug_file, debug_flags): Make not static.
* client.cc (uiserver_connect): Fix last change. Set debug log
stream.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2008-02-04 23:04:12 UTC (rev 47)
+++ trunk/src/ChangeLog 2008-02-05 00:16:02 UTC (rev 48)
@@ -1,3 +1,11 @@
+2008-02-05 Marcus Brinkmann <marcus at g10code.de>
+
+ * debug.h: Include <stdio.h>.
+ (debug_file, debug_flags): New prototypes.
+ * main.cc (debug_file, debug_flags): Make not static.
+ * client.cc (uiserver_connect): Fix last change. Set debug log
+ stream.
+
2008-02-04 Marcus Brinkmann <marcus at g10code.de>
* client.cc (send_one_option, getinfo_pid_cb, send_options): New
Modified: trunk/src/client.cc
===================================================================
--- trunk/src/client.cc 2008-02-04 23:04:12 UTC (rev 47)
+++ trunk/src/client.cc 2008-02-05 00:16:02 UTC (rev 48)
@@ -275,9 +275,15 @@
if (! rc)
{
+ if (debug_flags & DEBUG_ASSUAN)
+ assuan_set_log_stream (*ctx, debug_file);
+
rc = send_options (*ctx, hwnd, &pid);
- assuan_disconnect (*ctx);
- *ctx = NULL;
+ if (rc)
+ {
+ assuan_disconnect (*ctx);
+ *ctx = NULL;
+ }
}
return TRACE_GPGERR (rc);
Modified: trunk/src/debug.h
===================================================================
--- trunk/src/debug.h 2008-02-04 23:04:12 UTC (rev 47)
+++ trunk/src/debug.h 2008-02-05 00:16:02 UTC (rev 48)
@@ -23,6 +23,8 @@
#include <gpg-error.h>
+#include <stdio.h>
+
#ifdef __cplusplus
extern "C" {
#if 0
@@ -35,6 +37,13 @@
#define DEBUG_CONTEXT_MENU 2
#define DEBUG_ASSUAN 4
+/* No flags on means no debugging. */
+extern unsigned int debug_flags;
+
+/* Debug log stream. */
+extern FILE *debug_file;
+
+
#define STRINGIFY(v) #v
/* Log the formatted string FORMAT in categories FLAGS. */
Modified: trunk/src/main.cc
===================================================================
--- trunk/src/main.cc 2008-02-04 23:04:12 UTC (rev 47)
+++ trunk/src/main.cc 2008-02-05 00:16:02 UTC (rev 48)
@@ -110,9 +110,10 @@
static CRITICAL_SECTION debug_lock;
/* No flags on means no debugging. */
-static unsigned int debug_flags = 0;
+unsigned int debug_flags = 0;
-static FILE *debug_file;
+/* Debug log file. */
+FILE *debug_file;
/* Get the filename of the debug file, if any. */
More information about the Gnupg-commits
mailing list