From: Adam Dickmeiss Date: Mon, 22 Dec 2003 19:46:22 +0000 (+0000) Subject: Handle unexpected HTTP closed sessions better X-Git-Tag: YAZ.2.0.9~20 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=fbb6eed845e784c43b0167712787b812ed214152 Handle unexpected HTTP closed sessions better --- diff --git a/client/client.c b/client/client.c index 0b0e8fe..3d5861f 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.216 2003-12-20 00:51:19 adam Exp $ + * $Id: client.c,v 1.217 2003-12-22 19:46:22 adam Exp $ */ #include @@ -2140,7 +2140,7 @@ static int cmd_explain(const char *arg) #if HAVE_XML2 if (!conn) cmd_open(0); - if (1) + if (conn) { Z_SRW_PDU *sr = 0; @@ -2168,6 +2168,8 @@ static int cmd_find(const char *arg) #if HAVE_XML2 if (!conn) cmd_open(0); + if (!conn) + return 0; if (!send_SRW_searchRequest(arg)) return 0; #else @@ -2434,6 +2436,8 @@ static int cmd_show(const char *arg) #if HAVE_XML2 if (!conn) cmd_open(0); + if (!conn) + return 0; if (!send_SRW_presentRequest(arg)) return 0; #else