diff options
-rw-r--r-- | src/ChangeLog | 10 | ||||
-rw-r--r-- | src/assuan-buffer.c | 6 | ||||
-rw-r--r-- | src/assuan-handler.c | 2 |
3 files changed, 16 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9b08c2b..8d05c0e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2001-12-13 Marcus Brinkmann <marcus@gnu.org> + + * assuan-buffer.c (assuan_read_line): Fix order of execution to + get correct return values. + +2001-12-13 Werner Koch <wk@gnupg.org> + + * assuan-handler.c (assuan_get_active_fds): Fixed silly bug, + pretty obvious that nobody ever tested this function. + 2001-12-12 Werner Koch <wk@gnupg.org> * assuan-connect.c (assuan_pipe_connect): Implemented the inital diff --git a/src/assuan-buffer.c b/src/assuan-buffer.c index 50900c4..ee085d0 100644 --- a/src/assuan-buffer.c +++ b/src/assuan-buffer.c @@ -172,11 +172,15 @@ _assuan_read_line (ASSUAN_CONTEXT ctx) AssuanError assuan_read_line (ASSUAN_CONTEXT ctx, char **line, size_t *linelen) { + AssuanError err; + if (!ctx) return ASSUAN_Invalid_Value; + + err = _assuan_read_line (ctx); *line = ctx->inbound.line; *linelen = ctx->inbound.linelen; - return _assuan_read_line (ctx); + return err; } diff --git a/src/assuan-handler.c b/src/assuan-handler.c index ff8024a..614f83d 100644 --- a/src/assuan-handler.c +++ b/src/assuan-handler.c @@ -471,7 +471,7 @@ assuan_get_active_fds (ASSUAN_CONTEXT ctx, int what, { int n = 0; - if (ctx || fdarraysize < 2 || what < 0 || what > 1) + if (!ctx || fdarraysize < 2 || what < 0 || what > 1) return -1; if (!what) |