[svn] assuan - r294 - in trunk: . doc src

svn author wk cvs at cvs.gnupg.org
Tue Feb 24 16:24:58 CET 2009


Author: wk
Date: 2009-02-24 16:24:58 +0100 (Tue, 24 Feb 2009)
New Revision: 294

Modified:
   trunk/AUTHORS
   trunk/doc/assuan.texi
   trunk/src/ChangeLog
   trunk/src/assuan-buffer.c
Log:
Add hack for the inquiry feature.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2009-01-22 15:06:28 UTC (rev 293)
+++ trunk/src/ChangeLog	2009-02-24 15:24:58 UTC (rev 294)
@@ -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

Modified: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS	2009-01-22 15:06:28 UTC (rev 293)
+++ trunk/AUTHORS	2009-02-24 15:24:58 UTC (rev 294)
@@ -2,7 +2,8 @@
 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>

Modified: trunk/doc/assuan.texi
===================================================================
--- trunk/doc/assuan.texi	2009-01-22 15:06:28 UTC (rev 293)
+++ trunk/doc/assuan.texi	2009-02-24 15:24:58 UTC (rev 294)
@@ -247,7 +247,9 @@
 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.

Modified: trunk/src/assuan-buffer.c
===================================================================
--- trunk/src/assuan-buffer.c	2009-01-22 15:06:28 UTC (rev 293)
+++ trunk/src/assuan-buffer.c	2009-02-24 15:24:58 UTC (rev 294)
@@ -507,6 +507,9 @@
  * 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 @@
 {
   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 @@
       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
     {




More information about the Gnupg-commits mailing list