[svn] assuan - r255 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Wed Sep 5 18:03:06 CEST 2007
Author: marcus
Date: 2007-09-05 18:02:37 +0200 (Wed, 05 Sep 2007)
New Revision: 255
Modified:
trunk/src/ChangeLog
trunk/src/assuan-handler.c
Log:
2007-09-05 Marcus Brinkmann <marcus at g10code.de>
* assuan-handler.c (dispatch_command): Return non-critical errors
with PROCESS_DONE ().
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2007-09-03 14:16:40 UTC (rev 254)
+++ trunk/src/ChangeLog 2007-09-05 16:02:37 UTC (rev 255)
@@ -1,3 +1,8 @@
+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
@@ -3,4 +8,9 @@
with _ASSUAN_PREFIX.
+2007-09-03 Marcus Brinkmann <marcus at g10code.de>
+
+ * assuan.h [_ASSUAN_EXT_SYM_PREFIX]: Add missing symbol renames
+ with _ASSUAN_PREFIX.
+
* assuan.h (assuan_inquire_ext): Move buffer and buffer_length
arguments callback in prototype.
Modified: trunk/src/assuan-handler.c
===================================================================
--- trunk/src/assuan-handler.c 2007-09-03 14:16:40 UTC (rev 254)
+++ trunk/src/assuan-handler.c 2007-09-05 16:02:37 UTC (rev 255)
@@ -434,13 +434,21 @@
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 @@
}
}
if (!s)
- return set_error (ctx, Unknown_Command, NULL);
+ return PROCESS_DONE (ctx, set_error (ctx, Unknown_Command, NULL));
line += shift;
linelen -= shift;
More information about the Gnupg-commits
mailing list