[Pkg-gnupg-commit] [libassuan] 202/437: 2007-09-05 Marcus Brinkmann <marcus at g10code.de>
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:33:43 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 469154bc3ea0bc459ecd42f04b89e97ae6e8a284
Author: Marcus Brinkmann <mb at g10code.com>
Date: Wed Sep 5 16:02:37 2007 +0000
2007-09-05 Marcus Brinkmann <marcus at g10code.de>
* assuan-handler.c (dispatch_command): Return non-critical errors
with PROCESS_DONE ().
---
src/ChangeLog | 10 ++++++++++
src/assuan-handler.c | 14 +++++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 25a92d8..22e2959 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
+2007-09-05 Marcus Brinkmann <marcus at g10code.de>
+
+ * assuan-handler.c (dispatch_command): Return non-critical errors
+ with PROCESS_DONE ().
+
+2007-09-03 Marcus Brinkmann <marcus at g10code.de>
+
+ * assuan.h [_ASSUAN_EXT_SYM_PREFIX]: Add missing symbol renames
+ with _ASSUAN_PREFIX.
+
2007-09-03 Marcus Brinkmann <marcus at g10code.de>
* assuan.h [_ASSUAN_EXT_SYM_PREFIX]: Add missing symbol renames
diff --git a/src/assuan-handler.c b/src/assuan-handler.c
index 4aaa592..5fdc3d4 100644
--- a/src/assuan-handler.c
+++ b/src/assuan-handler.c
@@ -434,13 +434,21 @@ dispatch_command (assuan_context_t ctx, char *line, int linelen)
const char *s;
int shift, i;
+ /* Note that as this function is invoked by assuan_process_next as
+ well, we need to hide non-critical errors with PROCESS_DONE. */
+
if (*line == 'D' && line[1] == ' ') /* divert to special handler */
- return handle_data_line (ctx, line+2, linelen-2);
+ /* FIXME: Depending on the final implementation of
+ handle_data_line, this may be wrong here. For example, if a
+ user callback is invoked, and that callback is responsible for
+ calling assuan_process_done, then this is wrong. */
+ return PROCESS_DONE (handle_data_line (ctx, line+2, linelen-2));
for (p=line; *p && *p != ' ' && *p != '\t'; p++)
;
if (p==line)
- return set_error (ctx, Syntax_Error, "leading white-space");
+ return PROCESS_DONE
+ (ctx, set_error (ctx, Syntax_Error, "leading white-space"));
if (*p)
{ /* Skip over leading WS after the keyword */
*p++ = 0;
@@ -463,7 +471,7 @@ dispatch_command (assuan_context_t ctx, char *line, int linelen)
}
}
if (!s)
- return set_error (ctx, Unknown_Command, NULL);
+ return PROCESS_DONE (ctx, set_error (ctx, Unknown_Command, NULL));
line += shift;
linelen -= shift;
--
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