[Pkg-gnupg-commit] [libassuan] 239/437: Add hack for the inquiry feature.

Eric Dorland eric at moszumanska.debian.org
Fri May 22 05:33:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit b29e199ffdd108c0d207c9ec26038f747b994401
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Feb 24 15:24:58 2009 +0000

    Add hack for the inquiry feature.
---
 AUTHORS             | 3 ++-
 doc/assuan.texi     | 4 +++-
 src/ChangeLog       | 5 +++++
 src/assuan-buffer.c | 7 +++++--
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 7ac4415..42bb79d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,7 +2,8 @@ Package: libassuan
 Maintainer: Werner Koch <wk at gnupg.org>
 Bug reports: gnupg-devel at gnupg.org
 Security related bug reports: security at gnupg.org
-License: LGPLv2.1+
+License (library): LGPLv2.1+
+License (manual): GPLv3+
 
 
 Werner Koch  <wk at gnupg.org>
diff --git a/doc/assuan.texi b/doc/assuan.texi
index 479d4bb..b0c0451 100644
--- a/doc/assuan.texi
+++ b/doc/assuan.texi
@@ -247,7 +247,9 @@ Request could not be fulfilled.  The error codes are mostly application
 specific except for a few common ones.
 
 @item S @var{keyword} <status information depending on keyword>
-Informational output by the server, still processing the request.
+Informational output by the server, still processing the request.  A
+client may not send such lines to the server while processing an Inquiry
+command.
 
 @item # <string>
 Comment line issued only for debugging purposes.  Totally ignored.
diff --git a/src/ChangeLog b/src/ChangeLog
index 210b53c..3d875fb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-24  Werner Koch  <wk at g10code.com>
+
+	* assuan-buffer.c (assuan_send_data): Add hack to optionally send
+	a final "CAN".
+
 2008-11-03  Marcus Brinkmann  <marcus at g10code.de>
 
 	* assuan-handler.c (std_handler_help): Make I unsigned to silence
diff --git a/src/assuan-buffer.c b/src/assuan-buffer.c
index 3968584..b9e3572 100644
--- a/src/assuan-buffer.c
+++ b/src/assuan-buffer.c
@@ -507,6 +507,9 @@ _assuan_cookie_write_flush (void *cookie)
  * a INQUIRE response.  However, when assuan_transact() is used, this
  * function takes care of sending END itself.
  * 
+ * If BUFFER is NULL and LENGTH is 1 and we are a client, a "CAN" is
+ * send instead of an "END".
+ * 
  * Return value: 0 on success or an error code
  **/
 

@@ -515,7 +518,7 @@ assuan_send_data (assuan_context_t ctx, const void *buffer, size_t length)
 {
   if (!ctx)
     return _assuan_error (ASSUAN_Invalid_Value);
-  if (!buffer && length)
+  if (!buffer && length > 1)
     return _assuan_error (ASSUAN_Invalid_Value);
 
   if (!buffer)
@@ -524,7 +527,7 @@ assuan_send_data (assuan_context_t ctx, const void *buffer, size_t length)
       if (ctx->outbound.data.error)
         return ctx->outbound.data.error;
       if (!ctx->is_server)
-        return assuan_write_line (ctx, "END");
+        return assuan_write_line (ctx, length == 1? "CAN":"END");
     }
   else
     {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git



More information about the Pkg-gnupg-commit mailing list