* 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>
static void close_session (void)
{
- cs_close (conn);
+ if (conn)
+ cs_close (conn);
conn = 0;
if (session_mem)
{
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,
- 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);