X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=4e77d74068300adbc9030b83803aa14529210cf3;hb=27743f316331a9ea508df5f204416a6864fc320f;hp=ed9f21f6ff4b1ee8d00c9b2f1c217a94719870a5;hpb=9d9bbf2ad72a44772dca1e694de9a84c4e48aa21;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index ed9f21f..4e77d74 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2002, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.173 2002-10-22 10:05:36 adam Exp $ + * $Id: client.c,v 1.175 2002-12-05 12:19:23 adam Exp $ */ #include @@ -472,7 +472,11 @@ int cmd_open(char *arg) { printf ("error = %s\n", cs_strerror(conn)); if (conn->cerrno == CSYSERR) - perror("system"); + { + char msg[256]; + yaz_strerror(msg, sizeof(msg)); + printf ("%s\n", msg); + } cs_close(conn); conn = 0; return 0; @@ -619,7 +623,7 @@ static void display_record(Z_External *r) if (ent && ent->value == VAL_SOIF) print_record((const unsigned char *) r->u.octet_aligned->buf, r->u.octet_aligned->len); - else if (r->which == Z_External_octet && r->u.octet_aligned->len) + else if (r->which == Z_External_octet) { const char *octet_buf = (char*)r->u.octet_aligned->buf; if (ent->value == VAL_TEXT_XML || ent->value == VAL_APPLICATION_XML ||