(Finally!) support implementation-ID
authorMike Taylor <mike@indexdata.com>
Tue, 9 Sep 2003 11:40:10 +0000 (11:40 +0000)
committerMike Taylor <mike@indexdata.com>
Tue, 9 Sep 2003 11:40:10 +0000 (11:40 +0000)
Changes
SimpleServer.pm
SimpleServer.xs

diff --git a/Changes b/Changes
index a35a4d6..bc7e8dd 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,12 @@
 Revision history for Perl extension Net::Z3950::SimpleServer
 
 Revision history for Perl extension Net::Z3950::SimpleServer
 
+0.08  (IN PROGRESS)
+       - Support for IMP_ID parameter in Init responses.  This was
+         actually written a long time ago, but left commented out as
+         the underlying YAZ back-end server didn't support
+         implementation-ID setting.  Now that it does (and has done
+         for a long while), I've finally removed the comments.
+
 0.07  Fri Jan 03 10:12:15 2003
         - Applied Dave Mitchell's (davem@fdgroup.com) GRS-1 parsing patch.
          Thanks Dave, and sorry it didn't find its way to release 0.06,
 0.07  Fri Jan 03 10:12:15 2003
         - Applied Dave Mitchell's (davem@fdgroup.com) GRS-1 parsing patch.
          Thanks Dave, and sorry it didn't find its way to release 0.06,
index ca25ac3..06d1d3e 100644 (file)
 ##
 
 ## $Log: SimpleServer.pm,v $
 ##
 
 ## $Log: SimpleServer.pm,v $
-## Revision 1.16  2003-01-03 09:01:51  sondberg
+## Revision 1.17  2003-09-09 11:40:10  mike
+## (Finally!) support implementation-ID
+##
+## Revision 1.16  2003/01/03 09:01:51  sondberg
 ## Version 0.07.
 ##
 ## Revision 1.15  2002/09/16 14:00:16  sondberg
 ## Version 0.07.
 ##
 ## Revision 1.15  2002/09/16 14:00:16  sondberg
@@ -84,7 +87,7 @@ require AutoLoader;
 @EXPORT = qw(
        
 );
 @EXPORT = qw(
        
 );
-$VERSION = '0.07';
+$VERSION = '0.08';
 
 bootstrap Net::Z3950::SimpleServer $VERSION;
 
 
 bootstrap Net::Z3950::SimpleServer $VERSION;
 
@@ -279,6 +282,7 @@ The argument hash passed to the init handler has the form
   $args = {
                                    ## Response parameters:
 
   $args = {
                                    ## Response parameters:
 
+            IMP_ID    =>  "",      ## Z39.50 Implementation ID
             IMP_NAME  =>  "",      ## Z39.50 Implementation name
             IMP_VER   =>  "",      ## Z39.50 Implementation version
             ERR_CODE  =>  0,       ## Error code, cnf. Z39.50 manual
             IMP_NAME  =>  "",      ## Z39.50 Implementation name
             IMP_VER   =>  "",      ## Z39.50 Implementation version
             ERR_CODE  =>  0,       ## Error code, cnf. Z39.50 manual
@@ -298,7 +302,7 @@ result sets or a handle to a back-end search engine of some sort),
 it is always best to store them in a private session structure -
 rather than leaving them in global variables in your script.
 
 it is always best to store them in a private session structure -
 rather than leaving them in global variables in your script.
 
-The Implementation name and version are only really used by Z39.50
+The Implementation ID, name and version are only really used by Z39.50
 client developers to see what kind of server they're dealing with.
 Filling these in is optional.
 
 client developers to see what kind of server they're dealing with.
 Filling these in is optional.
 
index e3e08be..6924440 100644 (file)
  */
 
 /*$Log: SimpleServer.xs,v $
  */
 
 /*$Log: SimpleServer.xs,v $
-/*Revision 1.18  2003-01-03 09:05:41  sondberg
+/*Revision 1.19  2003-09-09 11:40:10  mike
+/*(Finally!) support implementation-ID
+/*
+/*Revision 1.18  2003/01/03 09:05:41  sondberg
 /*Applied Dave's GRS-1 patch - actually this was already done in revision 1.17.
 /*
 /*Revision 1.16  2002/11/26 17:09:18  mike
 /*Applied Dave's GRS-1 patch - actually this was already done in revision 1.17.
 /*
 /*Revision 1.16  2002/11/26 17:09:18  mike
@@ -1208,11 +1211,9 @@ bend_initresult *bend_init(bend_initrequest *q)
        zhandle->handle = handle;
        r->errcode = SvIV(status);
        r->handle = zhandle;
        zhandle->handle = handle;
        r->errcode = SvIV(status);
        r->handle = zhandle;
-#if 0 /* implementation_id support is not yet in mainstream Yaz */
        ptr = SvPV(id, len);
        q->implementation_id = (char *)xmalloc(len + 1);
        strcpy(q->implementation_id, ptr);
        ptr = SvPV(id, len);
        q->implementation_id = (char *)xmalloc(len + 1);
        strcpy(q->implementation_id, ptr);
-#endif
        ptr = SvPV(name, len);
        q->implementation_name = (char *)xmalloc(len + 1);
        strcpy(q->implementation_name, ptr);
        ptr = SvPV(name, len);
        q->implementation_name = (char *)xmalloc(len + 1);
        strcpy(q->implementation_name, ptr);