X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=ce1adbabf23682bb8f7fedcdde550c466ee6f6de;hb=7eab93067f8ab95e6b422eedb2d900ca19d4d15e;hp=261ff70be33fe79fdd1826d4fdfbb1ab95595d0a;hpb=39975667295ec760cc15b863f64e8d5fd74ac209;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 261ff70..ce1adba 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.346 2007-07-04 09:20:06 adam Exp $ + * $Id: client.c,v 1.349 2007-08-14 12:21:14 adam Exp $ */ /** \file client.c * \brief yaz-client program @@ -56,7 +56,6 @@ #include -#include #include #define NO_OID 1 #include @@ -172,9 +171,6 @@ static cql_transform_t cqltrans = 0; /* CQL context-set handle */ int rl_attempted_completion_over = 0; #endif -/* set this one to 1, to avoid decode of unknown MARCs */ -#define AVOID_MARC_DECODE 1 - #define maxOtherInfosSupported 10 struct eoi { Odr_oid oid[OID_SIZE]; @@ -718,21 +714,11 @@ int session_connect(const char *arg) conn = cs_create_host(yazProxy, 1, &add); else conn = cs_create_host(arg, 1, &add); - if (!conn) { printf ("Could not resolve address %s\n", arg); return 0; } - if (1) - { - COMSTACK tmp_cs = cs_create (tcpip_type, 0, PROTO_Z3950); - - void *addr = cs_straddr(tmp_cs, arg); - printf ("cs_straddr of %s %s\n", arg, addr ? "OK" : "Failed"); - - cs_close(tmp_cs); - } #if YAZ_HAVE_XML2 if (conn->protocol == PROTO_HTTP) queryType = QueryType_CQL; @@ -1929,6 +1915,20 @@ void process_ESResponse(Z_ExtendedServicesResponse *res) } } } + if (ext->which == Z_External_itemOrder) + { + Z_IOTaskPackage *otp = ext->u.itemOrder->u.taskPackage; + if (otp && otp->targetPart && otp->targetPart->itemRequest) + { + Z_External *ext = otp->targetPart->itemRequest; + if (ext->which == Z_External_octet) + { + Odr_oct *doc = ext->u.octet_aligned; + printf("Got itemRequest doc %.*s\n", + doc->len, doc->buf); + } + } + } } if (res->taskPackage && res->taskPackage->which == Z_External_octet) {