The YAZ GFS when converting SRW/SRU requests to Z39.50 structures
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 30 Sep 2004 11:13:42 +0000 (11:13 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 30 Sep 2004 11:13:42 +0000 (11:13 +0000)
now converts recordSchema to elementSetName as well as schema URI.

NEWS
src/seshigh.c

diff --git a/NEWS b/NEWS
index 90080c5..de1f631 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,13 @@
 Possible compatibility problems with earlier versions marked with '*'.
 
+--- 2.0.25 2004/09/30
+
+The YAZ GFS when converting SRW/SRU requests to Z39.50 structures
+now converts recordSchema to elementSetName as well as schema URI.
+
+Fixed bug in COMSTACK that prevented HTTP request packages from being
+decoded properly.
+
 --- 2.0.24 2004/09/29
 
 Added CCL facility r=r "range" which is similar to r=o "ordered" but
index d320f02..51cd30e 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1995-2004, Index Data
  * See the file LICENSE for details.
  *
- * $Id: seshigh.c,v 1.27 2004-09-10 11:28:58 adam Exp $
+ * $Id: seshigh.c,v 1.28 2004-09-30 11:13:42 adam Exp $
  */
 
 /*
@@ -510,9 +510,24 @@ static int srw_bend_fetch(association *assoc, int pos,
 
     rr.comp->u.complex->generic = (Z_Specification *) 
            odr_malloc(assoc->decode, sizeof(Z_Specification));
+
+    /* schema uri = recordSchema (or NULL if recordSchema is not given) */
     rr.comp->u.complex->generic->which = Z_Schema_uri;
     rr.comp->u.complex->generic->schema.uri = srw_req->recordSchema;
+
+    /* ESN = recordSchema if recordSchema is present */
     rr.comp->u.complex->generic->elementSpec = 0;
+    if (srw_req->recordSchema)
+    {
+       rr.comp->u.complex->generic->schema.uri = 
+
+       rr.comp->u.complex->generic->elementSpec = 
+           odr_malloc(assoc->encode, sizeof(Z_ElementSpec));
+       rr.comp->u.complex->generic->elementSpec->which = 
+           Z_ElementSpec_elementSetName;
+       rr.comp->u.complex->generic->elementSpec->u.elementSetName =
+           srw_req->recordSchema;
+    }
     
     rr.stream = assoc->encode;
     rr.print = assoc->print;
@@ -1325,7 +1340,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
                assoc->init->implementation_name,
                odr_prepend(assoc->encode, "GFS", resp->implementationName));
 
-    version = odr_strdup(assoc->encode, "$Revision: 1.27 $");
+    version = odr_strdup(assoc->encode, "$Revision: 1.28 $");
     if (strlen(version) > 10)  /* check for unexpanded CVS strings */
        version[strlen(version)-2] = '\0';
     resp->implementationVersion = odr_prepend(assoc->encode,