[svn] GnuPG - r5389 - branches/STABLE-BRANCH-2-0/agent
svn author wk
cvs at cvs.gnupg.org
Wed Aug 11 15:06:36 CEST 2010
Author: wk
Date: 2010-08-11 15:06:35 +0200 (Wed, 11 Aug 2010)
New Revision: 5389
Modified:
branches/STABLE-BRANCH-2-0/agent/ChangeLog
branches/STABLE-BRANCH-2-0/agent/call-scd.c
Log:
Pass on comment lines from scdaemon.
Modified: branches/STABLE-BRANCH-2-0/agent/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-2-0/agent/ChangeLog 2010-08-11 10:20:53 UTC (rev 5388)
+++ branches/STABLE-BRANCH-2-0/agent/ChangeLog 2010-08-11 13:06:35 UTC (rev 5389)
@@ -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-05-12 Werner Koch <wk at g10code.com>
* preset-passphrase.c (forget_passphrase): Actually implement
Modified: branches/STABLE-BRANCH-2-0/agent/call-scd.c
===================================================================
--- branches/STABLE-BRANCH-2-0/agent/call-scd.c 2010-08-11 10:20:53 UTC (rev 5388)
+++ branches/STABLE-BRANCH-2-0/agent/call-scd.c 2010-08-11 13:06:35 UTC (rev 5389)
@@ -42,6 +42,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
{
@@ -1129,6 +1138,7 @@
{
int rc;
struct inq_needpin_s inqparm;
+ int saveflag;
rc = start_scd (ctrl);
if (rc)
@@ -1138,10 +1148,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