projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f17b1db
)
Fix handling of HTTP error. Dont print details when omitted
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 12 May 2003 22:35:06 +0000
(22:35 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 12 May 2003 22:35:06 +0000
(22:35 +0000)
client/client.c
patch
|
blob
|
history
diff --git
a/client/client.c
b/client/client.c
index
6157a37
..
d48b74d
100644
(file)
--- a/
client/client.c
+++ b/
client/client.c
@@
-2,7
+2,7
@@
* Copyright (c) 1995-2003, Index Data
* See the file LICENSE for details.
*
* Copyright (c) 1995-2003, Index Data
* See the file LICENSE for details.
*
- * $Id: client.c,v 1.191 2003-04-30 14:04:45 adam Exp $
+ * $Id: client.c,v 1.192 2003-05-12 22:35:06 adam Exp $
*/
#include <stdio.h>
*/
#include <stdio.h>
@@
-2041,7
+2041,8
@@
static int send_SRW_presentRequest(const char *arg)
static void close_session (void)
{
static void close_session (void)
{
- cs_close (conn);
+ if (conn)
+ cs_close (conn);
conn = 0;
if (session_mem)
{
conn = 0;
if (session_mem)
{
@@
-2896,10
+2897,12
@@
static void handle_srw_response(Z_SRW_searchRetrieveResponse *res)
for (i = 0; i<res->num_diagnostics; i++)
{
for (i = 0; i<res->num_diagnostics; i++)
{
- printf ("SRW diagnostic %d %s\nDetails: %s\n",
+ printf ("SRW diagnostic %d %s\n",
*res->diagnostics[i].code,
*res->diagnostics[i].code,
- yaz_diag_srw_str(*res->diagnostics[i].code),
- res->diagnostics[i].details);
+ yaz_diag_srw_str(*res->diagnostics[i].code));
+
+ if (res->diagnostics[i].details)
+ printf ("Details: %s\n", res->diagnostics[i].details);
}
if (res->numberOfRecords)
printf ("Number of hits: %d\n", *res->numberOfRecords);
}
if (res->numberOfRecords)
printf ("Number of hits: %d\n", *res->numberOfRecords);