[svn] GnuPG - r5390 - trunk/agent
svn author wk
cvs at cvs.gnupg.org
Wed Aug 11 15:11:05 CEST 2010
Author: wk
Date: 2010-08-11 15:11:04 +0200 (Wed, 11 Aug 2010)
New Revision: 5390
Modified:
trunk/agent/ChangeLog
trunk/agent/call-scd.c
Log:
Pass on comments from SCD.
Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog 2010-08-11 13:06:35 UTC (rev 5389)
+++ trunk/agent/ChangeLog 2010-08-11 13:11:04 UTC (rev 5390)
@@ -1,3 +1,9 @@
+2010-08-11 Werner Koch <wk at g10code.com>
+
+ * call-scd.c (agent_card_scd): Pass assuan comment lines to the
+ caller.
+ (ASSUAN_CONVEY_COMMENTS): Provide replacement if needed.
+
2010-08-09 Werner Koch <wk at g10code.com>
* Makefile.am (t_common_ldadd): Add NETLIBS for sake of the TCP
Modified: trunk/agent/call-scd.c
===================================================================
--- trunk/agent/call-scd.c 2010-08-11 13:06:35 UTC (rev 5389)
+++ trunk/agent/call-scd.c 2010-08-11 13:11:04 UTC (rev 5390)
@@ -44,6 +44,15 @@
#define MAX_OPEN_FDS 20
#endif
+/* This Assuan flag is only available since libassuan 2.0.2. Because
+ comments lines are comments anyway we can use a replacement which
+ might not do anything. assuan_{g,s}et_flag don't return an error
+ thus there won't be any ABI problem. */
+#ifndef ASSUAN_CONVEY_COMMENTS
+#define ASSUAN_CONVEY_COMMENTS 4
+#endif
+
+
/* Definition of module local data of the CTRL structure. */
struct scd_local_s
{
@@ -1121,6 +1130,7 @@
{
int rc;
struct inq_needpin_s inqparm;
+ int saveflag;
rc = start_scd (ctrl);
if (rc)
@@ -1130,10 +1140,13 @@
inqparm.getpin_cb = getpin_cb;
inqparm.getpin_cb_arg = getpin_cb_arg;
inqparm.passthru = assuan_context;
+ saveflag = assuan_get_flag (ctrl->scd_local->ctx, ASSUAN_CONVEY_COMMENTS);
+ assuan_set_flag (ctrl->scd_local->ctx, ASSUAN_CONVEY_COMMENTS, 1);
rc = assuan_transact (ctrl->scd_local->ctx, cmdline,
pass_data_thru, assuan_context,
inq_needpin, &inqparm,
pass_status_thru, assuan_context);
+ assuan_set_flag (ctrl->scd_local->ctx, ASSUAN_CONVEY_COMMENTS, saveflag);
if (rc)
{
return unlock_scd (ctrl, rc);
More information about the Gnupg-commits
mailing list