Fix initialization of recordPacking in SRU search in case of
[yaz-moved-to-github.git] / client / client.c
index 29ec681..2888d17 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: client.c,v 1.313 2006-09-07 08:14:04 ja7 Exp $
+ * $Id: client.c,v 1.315 2006-09-22 14:09:25 adam Exp $
  */
 /** \file client.c
  *  \brief yaz-client program
@@ -1410,7 +1410,7 @@ static int send_SRW_searchRequest(const char *arg)
     if (record_schema)
         sr->u.request->recordSchema = record_schema;
     if (recordsyntax_size == 1 && recordsyntax_list[0] == VAL_TEXT_XML)
-        sr->u.explain_request->recordPacking = "xml";
+        sr->u.request->recordPacking = "xml";
     return send_srw(sr);
 }
 #endif
@@ -2300,10 +2300,10 @@ static int cmd_xmles(const char *arg)
         Z_APDU *apdu = zget_APDU(out, Z_APDU_extendedServicesRequest);
         Z_ExtendedServicesRequest *req = apdu->u.extendedServicesRequest;
         
-        req->referenceId = set_refid (out);
 
         Z_External *ext = (Z_External *) odr_malloc(out, sizeof(*ext));
         
+        req->referenceId = set_refid (out);
         req->taskSpecificParameters = ext;
         ext->indirect_reference = 0;
         ext->descriptor = 0;