From bbae3fcc7f1b9cf30cbfdd1ab3d7784b618ad6cc Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 10 Jan 2013 13:13:34 +0100 Subject: [PATCH] Relay present_number for search --- Makefile.PL | 7 ++----- SimpleServer.xs | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index cea9dab..bfb3863 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -15,13 +15,10 @@ SimpleServer module. ]; } -### Although this release of SimpleServer will work with version 3.0.2 -# of YAZ, you will not be able to take advantage of the new CCL -# support in the YAZ GFS unless you have version 3.0.9 or better. - +## present_number in search handler appeared in 4.2.48 chomp($yazver); my ($major, $minor, $trivial) = split(/\./, $yazver); -my ($needMaj, $needMin, $needTriv) = (3, 0, 2); +my ($needMaj, $needMin, $needTriv) = (4, 2, 48); #print "major=$major, minor=$minor, trivial=$trivial\n"; die "You have YAZ version $major.$minor.$trivial; " . "you need $needMaj.$needMin.$needTriv or better." diff --git a/SimpleServer.xs b/SimpleServer.xs index 06dc3b1..eb492e3 100644 --- a/SimpleServer.xs +++ b/SimpleServer.xs @@ -930,6 +930,7 @@ int bend_search(void *handle, bend_search_rr *rr) hv_store(href, "GHANDLE", 7, newSVsv(zhandle->ghandle), 0); hv_store(href, "HANDLE", 6, zhandle->handle, 0); hv_store(href, "PID", 3, newSViv(getpid()), 0); + hv_store(href, "PRESENT_NUMBER", 14, newSViv(rr->present_number), 0); if ((rpnSV = zquery2perl(rr->query)) != 0) { hv_store(href, "RPN", 3, rpnSV, 0); } -- 1.7.10.4