From ec96e7e16229e96777b3fa24ba12972e71c84915 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 28 Jul 2011 11:32:13 +0200 Subject: [PATCH] ZOOM: throw diagnostic for invalid sru value --- src/zoom-c.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/zoom-c.c b/src/zoom-c.c index 742b956..d2f33da 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -506,8 +506,15 @@ ZOOM_API(void) ZOOM_options_get_int(c->options, "preferredMessageSize", 1024*1024); c->async = ZOOM_options_get_bool(c->options, "async", 0); + + if (c->sru_mode == zoom_sru_error) + { + ZOOM_set_error(c, ZOOM_ERROR_UNSUPPORTED_PROTOCOL, val); + ZOOM_connection_remove_tasks(c); + return; + } + yaz_log(c->log_details, "%p ZOOM_connection_connect async=%d", c, c->async); - ZOOM_connection_add_task(c, ZOOM_TASK_CONNECT); if (!c->async) -- 1.7.10.4