X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=client%2Fclient.c;h=4f8ccae275389c531ddeba82d79900a953cf7f0c;hp=64e92cc1b5e1c50749bce052178274a93f949eba;hb=99d342b33ff48e94f97d631b127279f2face6124;hpb=8b1a2764e09b3573a1d01edc193930962bf3401a diff --git a/client/client.c b/client/client.c index 64e92cc..4f8ccae 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.316 2006-09-27 11:38:59 adam Exp $ + * $Id: client.c,v 1.317 2006-10-04 07:26:00 adam Exp $ */ /** \file client.c * \brief yaz-client program @@ -2294,6 +2294,7 @@ static int cmd_xmles(const char *arg) return 1; else { + char *asn_buf = 0; int noread = 0; char oid_str[51]; int oid_value_xmles = VAL_XMLES; @@ -2322,10 +2323,13 @@ static int cmd_xmles(const char *arg) printf("Bad OID: %s\n", oid_str); return 0; } - - if (parse_cmd_doc(&arg, out, (char **) &ext->u.single_ASN1_type->buf, + + if (parse_cmd_doc(&arg, out, &asn_buf, &ext->u.single_ASN1_type->len, 0) == 0) return 0; + + ext->u.single_ASN1_type->buf = (unsigned char *) asn_buf; + req->packageType = yaz_oidval_to_z3950oid(out, CLASS_EXTSERV, oid_value_xmles);