diff options
-rw-r--r-- | AUTHORS | 3 | ||||
-rw-r--r-- | doc/assuan.texi | 4 | ||||
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/assuan-buffer.c | 7 |
4 files changed, 15 insertions, 4 deletions
@@ -2,7 +2,8 @@ Package: libassuan Maintainer: Werner Koch <[email protected]> Bug reports: [email protected] Security related bug reports: [email protected] -License: LGPLv2.1+ +License (library): LGPLv2.1+ +License (manual): GPLv3+ Werner Koch <[email protected]> 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 <[email protected]> + + * assuan-buffer.c (assuan_send_data): Add hack to optionally send + a final "CAN". + 2008-11-03 Marcus Brinkmann <[email protected]> * 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 { |