[svn] assuan - r387 - in trunk: . src
svn author wk
cvs at cvs.gnupg.org
Wed Sep 1 12:10:29 CEST 2010
Author: wk
Date: 2010-09-01 12:10:28 +0200 (Wed, 01 Sep 2010)
New Revision: 387
Modified:
trunk/NEWS
trunk/src/ChangeLog
trunk/src/assuan-defs.h
trunk/src/assuan-logging.c
trunk/src/assuan.h.in
trunk/src/context.c
Log:
Add a no_logging flag.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2010-08-19 13:19:56 UTC (rev 386)
+++ trunk/src/ChangeLog 2010-09-01 10:10:28 UTC (rev 387)
@@ -1,3 +1,10 @@
+2010-09-01 Werner Koch <wk at g10code.com>
+
+ * assuan.h.in (ASSUAN_NO_LOGGING): New.
+ * assuan-defs.h (struct assuan_context_s): Add FLAGS.NO_LOGGING.
+ * context.c (assuan_set_flag, assuan_get_flag): Support new flag.
+ * assuan-logging.c (_assuan_log_control_channel): Implement new flag.
+
2010-08-11 Werner Koch <wk at g10code.com>
* assuan.h.in (ASSUAN_CONVEY_COMMENTS): New.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-08-19 13:19:56 UTC (rev 386)
+++ trunk/NEWS 2010-09-01 10:10:28 UTC (rev 387)
@@ -3,9 +3,12 @@
* A new flag may now be used to convey comments via assuan_transact.
+ * A new flag value may now be used to disable logging.
+
* Interface changes relative to the 2.0.1 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ASSUAN_CONVEY_COMMENTS NEW.
+ ASSUAN_NO_LOGGING NEW.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -24,6 +27,7 @@
assuan_free NEW.
_assuan_w32ce_create_pipe NEW.
ASSUAN_LOG_CONTROL NEW.
+ ASSUAN_NO_LOGGING NEW.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: trunk/src/assuan-defs.h
===================================================================
--- trunk/src/assuan-defs.h 2010-08-19 13:19:56 UTC (rev 386)
+++ trunk/src/assuan-defs.h 2010-09-01 10:10:28 UTC (rev 387)
@@ -88,6 +88,7 @@
unsigned int confidential : 1;
unsigned int no_fixsignals : 1;
unsigned int convey_comments : 1;
+ unsigned int no_logging : 1;
} flags;
/* If set, this is called right before logging an I/O line. */
Modified: trunk/src/assuan-logging.c
===================================================================
--- trunk/src/assuan-logging.c 2010-08-19 13:19:56 UTC (rev 386)
+++ trunk/src/assuan-logging.c 2010-09-01 10:10:28 UTC (rev 387)
@@ -170,7 +170,9 @@
/* Check whether logging is enabled and do a quick check to see
whether the callback supports our category. */
- if (!ctx || !ctx->log_cb
+ if (!ctx
+ || !ctx->log_cb
+ || ctx->flags.no_logging
|| !(*ctx->log_cb) (ctx, ctx->log_cb_data, ASSUAN_LOG_CONTROL, NULL))
return;
Modified: trunk/src/assuan.h.in
===================================================================
--- trunk/src/assuan.h.in 2010-08-19 13:19:56 UTC (rev 386)
+++ trunk/src/assuan.h.in 2010-09-01 10:10:28 UTC (rev 387)
@@ -164,6 +164,8 @@
/* This flag changes assuan_transact to return comment lines via the
status callback. The default is to skip comment lines. */
#define ASSUAN_CONVEY_COMMENTS 4
+/* This flags disables logging for one context. */
+#define ASSUAN_NO_LOGGING 5
/* For context CTX, set the flag FLAG to VALUE. Values for flags
are usually 1 or 0 but certain flags might allow for other values;
Modified: trunk/src/context.c
===================================================================
--- trunk/src/context.c 2010-08-19 13:19:56 UTC (rev 386)
+++ trunk/src/context.c 2010-09-01 10:10:28 UTC (rev 387)
@@ -84,6 +84,10 @@
case ASSUAN_CONVEY_COMMENTS:
ctx->flags.convey_comments = value;
break;
+
+ case ASSUAN_NO_LOGGING:
+ ctx->flags.no_logging = value;
+ break;
}
}
@@ -116,6 +120,10 @@
case ASSUAN_CONVEY_COMMENTS:
res = ctx->flags.convey_comments;
break;
+
+ case ASSUAN_NO_LOGGING:
+ res = ctx->flags.no_logging;
+ break;
}
return TRACE_SUC1 ("flag_value=%i", res);
More information about the Gnupg-commits
mailing list