From 1c990926c6fddba74f38f4c2bcd701d1994a5e1b Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 9 Jan 2002 12:44:31 +0000 Subject: [PATCH] ZOOM fix: fatal errors aren't reset. --- CHANGELOG | 3 +++ zoom/zoom-c.c | 24 +++++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 32c3090..0e3c5f6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ Possible compatibility problems with earlier versions marked with '*'. +ZOOM fix: error information only cleared for Bib-diagnostics (not +fatal errors, like connection failed, etc). + ZOOM_record_get returns ISO2709 buffer when "raw" is given. --- 1.8.4 2002/01/04 diff --git a/zoom/zoom-c.c b/zoom/zoom-c.c index 1e1be0d..b36d9b2 100644 --- a/zoom/zoom-c.c +++ b/zoom/zoom-c.c @@ -1,5 +1,5 @@ /* - * $Id: zoom-c.c,v 1.19 2002-01-09 11:03:41 adam Exp $ + * $Id: zoom-c.c,v 1.20 2002-01-09 12:44:31 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -69,9 +69,21 @@ static ZOOM_Event ZOOM_connection_get_event(ZOOM_connection c) static void clear_error (ZOOM_connection c) { - c->error = ZOOM_ERROR_NONE; - xfree (c->addinfo); - c->addinfo = 0; + + switch (c->error) + { + case ZOOM_ERROR_CONNECT: + case ZOOM_ERROR_MEMORY: + case ZOOM_ERROR_DECODE: + case ZOOM_ERROR_CONNECTION_LOST: + case ZOOM_ERROR_INIT: + case ZOOM_ERROR_INTERNAL: + break; + default: + c->error = ZOOM_ERROR_NONE; + xfree (c->addinfo); + c->addinfo = 0; + } } ZOOM_task ZOOM_connection_add_task (ZOOM_connection c, int which) @@ -245,7 +257,9 @@ void ZOOM_connection_connect(ZOOM_connection c, ZOOM_options_set(c->options, "host", c->host_port); c->async = ZOOM_options_get_bool (c->options, "async", 0); - + + c->error = ZOOM_ERROR_NONE; + task = ZOOM_connection_add_task (c, ZOOM_TASK_CONNECT); if (!c->async) -- 1.7.10.4