From fbb6eed845e784c43b0167712787b812ed214152 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 22 Dec 2003 19:46:22 +0000 Subject: [PATCH] Handle unexpected HTTP closed sessions better --- client/client.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 1.7.10.4