Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/metaproxy
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 29 Apr 2011 11:27:38 +0000 (11:27 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 29 Apr 2011 11:27:38 +0000 (11:27 +0000)
Conflicts:
IDMETA

140 files changed:
Makefile.am
NEWS
README
buildconf.sh
configure.ac
debian/changelog
debian/libmetaproxy3-dev.install
doc/Makefile.am
doc/auth_simple.xml
doc/backend_test.xml
doc/book.xml
doc/bounce.xml
doc/copyright.xml
doc/cql_rpn.xml
doc/frontend_net.xml
doc/http_file.xml
doc/limit.xml
doc/load_balance.xml
doc/log.xml
doc/metaproxy.xml
doc/multi.xml
doc/query_rewrite.xml
doc/record_transform.xml
doc/session_shared.xml
doc/sru_z3950.xml
doc/template.xml
doc/virt_db.xml
doc/z3950_client.xml
doc/zeerex_explain.xml
etc/config-shared1.xml
etc/config1.xml
etc/config3.xml
example-module/filter_myfilter.cpp
include/Makefile.am
include/metaproxy/Makefile.am
include/metaproxy/filter.hpp
include/metaproxy/origin.hpp
include/metaproxy/package.hpp
include/metaproxy/router.hpp
include/metaproxy/session.hpp
include/metaproxy/util.hpp
include/metaproxy/xmlutil.hpp
metaproxy-config.in [new file with mode: 0644]
metaproxy.spec [new file with mode: 0644]
rpm/metaproxy.init [new file with mode: 0755]
rpm/metaproxy.logrotate [new file with mode: 0644]
rpm/metaproxy.xml [new file with mode: 0644]
src/Makefile.am
src/ex_filter_frontend_net.cpp
src/ex_router_flexml.cpp
src/factory_filter.cpp
src/factory_filter.hpp
src/factory_static.cpp
src/factory_static.hpp
src/filter.cpp
src/filter_auth_simple.cpp
src/filter_auth_simple.hpp
src/filter_backend_test.cpp
src/filter_backend_test.hpp
src/filter_bounce.cpp
src/filter_bounce.hpp
src/filter_cgi.cpp
src/filter_cgi.hpp
src/filter_cql_to_rpn.cpp
src/filter_cql_to_rpn.hpp
src/filter_dl.cpp
src/filter_frontend_net.cpp
src/filter_frontend_net.hpp
src/filter_http_file.cpp
src/filter_http_file.hpp
src/filter_limit.cpp
src/filter_limit.hpp
src/filter_load_balance.cpp
src/filter_load_balance.hpp
src/filter_log.cpp
src/filter_log.hpp
src/filter_multi.cpp
src/filter_multi.hpp
src/filter_query_rewrite.cpp
src/filter_query_rewrite.hpp
src/filter_record_transform.cpp
src/filter_record_transform.hpp
src/filter_session_shared.cpp
src/filter_session_shared.hpp
src/filter_sru_to_z3950.cpp
src/filter_sru_to_z3950.hpp
src/filter_template.cpp
src/filter_template.hpp
src/filter_virt_db.cpp
src/filter_virt_db.hpp
src/filter_z3950_client.cpp
src/filter_z3950_client.hpp
src/filter_zeerex_explain.cpp
src/filter_zeerex_explain.hpp
src/gduutil.cpp
src/gduutil.hpp
src/metaproxy_prog.cpp
src/origin.cpp
src/package.cpp
src/pipe.cpp
src/pipe.hpp
src/plainfile.cpp
src/router_chain.cpp
src/router_chain.hpp
src/router_flexml.cpp
src/router_flexml.hpp
src/session.cpp
src/sru_util.cpp
src/sru_util.hpp
src/test_boost_threads.cpp
src/test_filter1.cpp
src/test_filter2.cpp
src/test_filter_auth_simple.cpp
src/test_filter_backend_test.cpp
src/test_filter_bounce.cpp
src/test_filter_factory.cpp
src/test_filter_frontend_net.cpp
src/test_filter_log.cpp
src/test_filter_multi.cpp
src/test_filter_query_rewrite.cpp
src/test_filter_record_transform.cpp
src/test_filter_sru_to_z3950.cpp
src/test_filter_virt_db.cpp
src/test_filter_z3950_client.cpp
src/test_package1.cpp
src/test_pipe.cpp
src/test_router_flexml.cpp
src/test_ses_map.cpp
src/test_session1.cpp
src/test_session2.cpp
src/test_thread_pool_observer.cpp
src/thread_pool_observer.cpp
src/thread_pool_observer.hpp
src/tstdl.cpp
src/util.cpp
src/xmlutil.cpp
win/makefile
xml/schema/metaproxy.rnc
xml/schema/metaproxy.rng
xml/schema/metaproxy.xsd

index f9ab81a..2505bca 100644 (file)
@@ -1,5 +1,5 @@
 ## This file is part of Metaproxy
-## Copyright (C) 2005-2010 Index Data
+## Copyright (C) 2005-2011 Index Data
 
 SUBDIRS = xml include src etc doc
 
@@ -8,8 +8,8 @@ ACLOCAL_AMFLAGS = -I m4
 AUTOMAKE_OPTIONS = foreign
 
 EXTRA_DIST = Doxyfile.in NEWS README LICENSE \
-             m4/yazpp.m4 m4/yaz.m4 m4/ax_boost.m4 \
-             buildconf.sh
+             m4/yazpp.m4 m4/yaz.m4 m4/boost.m4 \
+             buildconf.sh metaproxy.spec metaproxy-config.in
 
 MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure 
 
@@ -17,6 +17,8 @@ dist-hook:
        if test -x /usr/bin/git -a -d .git; then git log >ChangeLog ; cp ChangeLog $(distdir); fi
        mkdir $(distdir)/win
        -cp $(srcdir)/win/* $(distdir)/win
+       mkdir $(distdir)/rpm
+       -cp $(srcdir)/rpm/* $(distdir)/rpm
 
 .PHONY:dox
 dox:
diff --git a/NEWS b/NEWS
index 0e22d84..103f8a6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,37 @@
+Filter z3950_client may be configured to always send a close APDU
+to backend target when connection/session is closed. This will only
+happen if close APDU is not already sent. Enabled by configuration
+for z3950_client (force_close).
+
+Filter virt_db and multi relays close APDU.
+
+Filter virt_db and multi: relay init size parameters 
+preferredMessageSize and maximumRecordSize.
+
+Filter sru_z3950: increase init sz parameters from 1MB to 10 MB.
+
+--- 1.2.4 2011/01/27
+
+RPM package for Metaproxy works for both SLES11 and Centos 5.5.
+
+metaproxy-config: exec_prefix, libdir, includedir. Use these variables
+as determined by configure.
+
+RPM: Release includes 'indexdata' name. Use indexdata in release name so
+this package can be distinguished from other vendors.
+
+--- 1.2.3 2010/10/04
+
+Fix filter multi: relay idAuthentication parameters.
+
+--- 1.2.2 2010/09/15
+
+Add metaproxy-config for returning compiler flags, libraries.
+
+--- 1.2.1 2010/08/18
+
+Fix --with-boost=PREFIX .
+
 --- 1.2.0 2010/07/09
 
 session_shared: fix use of maintenance thread.
diff --git a/README b/README
index 47312ee..9c43334 100644 (file)
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 Metaproxy - a universal Z39.50/SRU router.
 
 The "doc" directory contains documentation in HTML.
-You can also read it online at http://www.indexdata.dk/metaproxy/
+You can also read it online at http://www.indexdata.com/metaproxy/
 
 Read the documentation in the 'doc' directory for installation
 instructions. 
index 1850bae..8d12ad9 100755 (executable)
@@ -14,11 +14,11 @@ fi
 if [ "`uname -s`" = FreeBSD ]; then
     # FreeBSD intalls the various auto* tools with version numbers
     echo "Using special configuration for FreeBSD ..."
-    automake=automake19
-    aclocal="aclocal19 -I /usr/local/share/aclocal"
-    autoconf=autoconf259
-    libtoolize=libtoolize15
-    autoheader=autoheader259
+    automake=automake
+    aclocal="aclocal -I /usr/local/share/aclocal"
+    autoconf=autoconf
+    libtoolize=libtoolize
+    autoheader=autoheader
 fi
 
 if [ "`uname -s`" = Darwin ]; then
@@ -71,7 +71,8 @@ esac
 
 if $enable_configure; then
     if [ -n "$sh_cflags" ]; then
-       CFLAGS="$sh_cflags" CXXFLAGS="$sh_cxxflags" ./configure --disable-shared --enable-static $*
+       CFLAGS="$sh_cflags" CXXFLAGS="$sh_cxxflags" ./configure \
+               --disable-shared --enable-static --with-pic $*
     else
        ./configure $*
     fi
@@ -117,9 +118,9 @@ EOF
     fi
     if [ "`uname -s`" = FreeBSD ]; then
         cat <<EOF
-When building from a Git, you need these FreeBSD Ports:
-  autoconf259, automake19, libtool15, bison, tcl84,
-  docbook-xsl, libxml2, libxslt, g++-4.0, make
+  pkg_add -r autoconf262 automake110 libtool bison tcl84 \\
+             docbook-xsl libxml2 libxslt boost-all
+  pkg_add -r icu4
 EOF
     fi
 fi
index e66e607..90b32fb 100644 (file)
@@ -3,7 +3,7 @@
 
 # Autoconf and automake setup
 AC_PREREQ([2.60])
-AC_INIT([metaproxy],[1.2.0],[metaproxy-help@indexdata.dk])
+AC_INIT([metaproxy],[1.2.4],[metaproxy-help@indexdata.dk])
 
 AC_CONFIG_HEADERS([src/config.hpp])
 
@@ -61,6 +61,7 @@ fi
 AC_DEFINE_UNQUOTED([VERSION_SHA1], "$SHA1", [SHA-1 from Git])
 
 AC_CONFIG_FILES([
+       metaproxy-config
         Doxyfile
        Makefile
        include/Makefile include/metaproxy/Makefile
@@ -73,6 +74,9 @@ AC_CONFIG_FILES([
         doc/common/Makefile
        doc/common/print.dsl
        etc/Makefile
+],[
+        sed s%echo_source=yes%echo_source=no%g < metaproxy-config > src/metaproxy-config && chmod +x metaproxy-config src/metaproxy-config
+
 ])
 
 AC_OUTPUT
index e75c5a3..a8a2616 100644 (file)
@@ -1,3 +1,27 @@
+metaproxy (1.2.4-2indexdata) unstable; urgency=low
+
+  * Internal.
+
+ -- Adam Dickmeiss <adam@indexdata.dk>  Mon, 14 Feb 2011 14:35:29 +0100
+
+metaproxy (1.2.4-1indexdata) unstable; urgency=low
+
+  * Upstream.
+
+ -- Adam Dickmeiss <adam@indexdata.dk>  Thu, 27 Jan 2011 14:52:05 +0100
+
+metaproxy (1.2.3-1indexdata) unstable; urgency=low
+
+  * Upstream.
+
+ -- Adam Dickmeiss <adam@indexdata.dk>  Mon, 04 Oct 2010 10:05:26 +0200
+
+metaproxy (1.2.2-1indexdata) unstable; urgency=low
+
+  * Upstream.
+
+ -- Adam Dickmeiss <adam@indexdata.dk>  Wed, 15 Sep 2010 13:41:54 +0200
+
 metaproxy (1.2.0-1indexdata) unstable; urgency=low
 
   * Upstream.
index f1c58d2..e272241 100644 (file)
@@ -1,3 +1,4 @@
 debian/tmp/usr/include/metaproxy
 debian/tmp/usr/lib/libmetaproxy*.a
 debian/tmp/usr/lib/libmetaproxy*.so
+debian/tmp/usr/bin/metaproxy-config
index 2ffd045..996be26 100644 (file)
@@ -1,5 +1,7 @@
 SUBDIRS = common
 
+INKSCAPE=inkscape
+
 SUFFIXES=.3mp .1 .pdf .tkl .esp .xml 
 
 XMLFILES = book.xml manref.xml copyright.xml gpl-2.0.xml
@@ -94,11 +96,12 @@ manref.xml: $(XMLMAN) $(srcdir)/common/stripref.xsl $(srcdir)/copyright.xml
                xsltproc $(srcdir)/common/stripref.xsl $(srcdir)/$$i | sed 1d >> manref.xml; \
        done
 
+
 multi.png: multi.svg
-       unset DISPLAY; inkscape --export-png=$@ --export-area=0:0:1050:500 $?
+       unset DISPLAY; ${INKSCAPE} --export-png=$@ --export-area=0:0:1050:500 $?
 
 multi.eps: multi.svg
-       unset DISPLAY; inkscape --export-eps=$@ --export-bbox-page $?
+       unset DISPLAY; ${INKSCAPE} --export-eps=$@ --export-bbox-page $?
 
 .eps.pdf:
        epstopdf -hires $?
index c5de45b..72d214a 100644 (file)
@@ -1,14 +1,19 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-auth_simple">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
  <refmeta>
   <refentrytitle>auth_simple</refentrytitle>
   <manvolnum>3mp</manvolnum>
-  <refmiscinfo>Metaproxy Module</refmiscinfo>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 3c7eb80..9417693 100644 (file)
@@ -1,14 +1,19 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-backend_test">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>backend_test</refentrytitle>
   <manvolnum>3mp</manvolnum>
-  <refmiscinfo>Metaproxy Module</refmiscinfo>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index cd56fd3..566a9ee 100644 (file)
@@ -1,23 +1,14 @@
 <?xml version="1.0" standalone="no"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1//EN"
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" 
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" 
 [
+     <!ENTITY copyright SYSTEM "copyright.xml">
      <!ENTITY % local SYSTEM "local.ent">
      %local;
      <!ENTITY manref SYSTEM "manref.xml">
-     <!ENTITY progref SYSTEM "progref.xml">
      <!ENTITY gpl2 SYSTEM "gpl-2.0.xml">
      <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
-     <!-- Next line allows imagedata/@format="PDF" and is taken from 
-         http://lists.oasis-open.org/archives/docbook/200303/msg00163.html
-     -->
-     <!ENTITY % local.notation.class "| PDF">
-     <!-- Next line is necessary for some XML parsers, for reasons I
-          don't understand.  I got this from
-         http://lists.oasis-open.org/archives/docbook/200303/msg00180.html
-     -->
-     <!NOTATION PDF SYSTEM "PDF">
 ]>
 <book>
  <bookinfo>
@@ -35,7 +26,7 @@
   </authorgroup>
   <releaseinfo>&version;</releaseinfo>
   <copyright>
-   <year>2005-2010</year>
+   <year>2005-2011</year>
    <holder>Index Data</holder>
   </copyright>
   <abstract>
@@ -1658,13 +1649,8 @@ Z>
     merges them into a single Search response, which is what
     eventually makes it back to the client.
    </para>
-  </section>
-
 
-  <section id="multidb.picture">
-   <title>A picture is worth a thousand words (but only five hundred on 64-bit architectures)</title>
-   <simpara>
-    <inlinemediaobject>
+    <mediaobject>
      <imageobject>
       <imagedata fileref="multi.pdf" format="PDF" scale="50"/>
      </imageobject>
@@ -1681,13 +1667,10 @@ Z>
        document.]
       </phrase>
      </textobject>
-<!-- ### This used to work with an older version of DocBook
      <caption>
-      <para>Caption: progress of packages through filters.</para>
+      <para>A picture is worth a thousand words (but only five hundred on 64-bit architectures)</para>
      </caption>
--->
-    </inlinemediaobject>
-   </simpara>
+    </mediaobject>
   </section>
  </chapter>
 
@@ -2085,9 +2068,7 @@ Z>
 <appendix id="license">
  <title>License</title>
 
-  <para>
-   Metaproxy, Copyright &copy; 1995-2010 Index Data.
- </para>
+  &copyright;
 
   <para>
    Metaproxy is free software; you can redistribute it and/or modify it under
index c433d8e..5c88286 100644 (file)
@@ -1,14 +1,19 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-bounce">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>bounce</refentrytitle>
   <manvolnum>3mp</manvolnum>
-  <refmiscinfo>Metaproxy Module</refmiscinfo>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 3f1b42b..8d7d1ef 100644 (file)
@@ -1,5 +1,5 @@
 <refsect1><title>COPYRIGHT</title>
  <para>
-  Copyright (c) 2005-2010, Index Data
+  Copyright (C) 2005-2011 Index Data
  </para>
 </refsect1>
index 161a57d..d11eb2e 100644 (file)
@@ -1,14 +1,19 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-cql_rpn">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>cql_rpn</refentrytitle>
   <manvolnum>3mp</manvolnum>
-   <refmiscinfo>Metaproxy Module</refmiscinfo>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
 </refmeta>
  
  <refnamediv>
index c48e539..9b0eb9e 100644 (file)
@@ -1,15 +1,20 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-frontend_net">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>frontend_net</refentrytitle>
   <manvolnum>3mp</manvolnum>
-   <refmiscinfo>Metaproxy Module</refmiscinfo>
-</refmeta>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
  
  <refnamediv>
   <refname>frontend_net</refname>
index 2510a20..59395ea 100644 (file)
@@ -1,15 +1,20 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-http_file">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>http_file</refentrytitle>
   <manvolnum>3mp</manvolnum>
-   <refmiscinfo>Metaproxy Module</refmiscinfo>
-</refmeta>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
  
  <refnamediv>
   <refname>http_file</refname>
index 67431f2..8f55b88 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
index f71a294..51868b8 100644 (file)
@@ -1,15 +1,20 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-load_balance">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>load_balance</refentrytitle>
   <manvolnum>3mp</manvolnum>
-   <refmiscinfo>Metaproxy Module</refmiscinfo>
-</refmeta>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
  
  <refnamediv>
   <refname>load_balance</refname>
index 5957b50..adf27ab 100644 (file)
@@ -1,15 +1,20 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-log">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>log</refentrytitle>
   <manvolnum>3mp</manvolnum>
-   <refmiscinfo>Metaproxy Module</refmiscinfo>
-</refmeta>
+   <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
  
  <refnamediv>
   <refname>log</refname>
index 3ae0919..f37b564 100644 (file)
@@ -1,13 +1,19 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-metaproxy">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>metaproxy</refentrytitle>
   <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index e4ec619..15546cc 100644 (file)
@@ -1,15 +1,20 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-multi">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>multi</refentrytitle>
   <manvolnum>3mp</manvolnum>
-   <refmiscinfo>Metaproxy Module</refmiscinfo>
-</refmeta>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
  
  <refnamediv>
   <refname>multi</refname>
index 4fb77d5..7c23948 100644 (file)
@@ -1,15 +1,20 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-query_rewrite">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>query_rewrite</refentrytitle>
   <manvolnum>3mp</manvolnum>
-   <refmiscinfo>Metaproxy Module</refmiscinfo>
-</refmeta>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
  
  <refnamediv>
   <refname>query_rewrite</refname>
index c38b3db..6a96ec6 100644 (file)
@@ -1,15 +1,20 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-record_transform">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>record_transform</refentrytitle>
   <manvolnum>3mp</manvolnum>
-   <refmiscinfo>Metaproxy Module</refmiscinfo>
-</refmeta>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
  
  <refnamediv>
   <refname>record_transform</refname>
index e987045..7a56ead 100644 (file)
@@ -1,14 +1,19 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-session_shared">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>session_shared</refentrytitle>
   <manvolnum>3mp</manvolnum>
-  <refmiscinfo>Metaproxy Module</refmiscinfo>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 2f9e121..334b660 100644 (file)
@@ -1,14 +1,19 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-sru_z3950">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>sru_z3950</refentrytitle>
   <manvolnum>3mp</manvolnum>
-  <refmiscinfo>Metaproxy Module</refmiscinfo>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index a7375c9..633c7a5 100644 (file)
@@ -1,14 +1,19 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-template">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>template</refentrytitle>
   <manvolnum>3mp</manvolnum>
-  <refmiscinfo>Metaproxy Module</refmiscinfo>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 13b86ad..10b796a 100644 (file)
@@ -1,15 +1,20 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-virt_db">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>virt_db</refentrytitle>
   <manvolnum>3mp</manvolnum>
-   <refmiscinfo>Metaproxy Module</refmiscinfo>
-</refmeta>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
  
  <refnamediv>
   <refname>virt_db</refname>
index 8934737..2c29028 100644 (file)
@@ -1,15 +1,20 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-z3950_client">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>z3950_client</refentrytitle>
   <manvolnum>3mp</manvolnum>
-   <refmiscinfo>Metaproxy Module</refmiscinfo>
-</refmeta>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
  
  <refnamediv>
   <refname>z3950_client</refname>
       </para>
      </listitem>
     </varlistentry>
+    <varlistentry><term>force_close</term>
+     <listitem>
+      <para>
+       Is a boolean value (false, true). If true, the Z39.50 client will
+       terminate Z39.50 sessions with a close APDU followed by a socket close.
+       If false (default), the Z39.50 client will be transparent and only 
+       send a close if the peer client does it too.
+      </para>
+     </listitem>
+    </varlistentry>
    </variablelist>
   </para>
  </refsect1>
index 73959b4..737b4f4 100644 (file)
@@ -1,14 +1,19 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY copyright SYSTEM "copyright.xml">    
  <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
 <refentry id="ref-zeerex_explain">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
  <refmeta>
   <refentrytitle>zeerex_explain</refentrytitle>
   <manvolnum>3mp</manvolnum>
-  <refmiscinfo>Metaproxy Module</refmiscinfo>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 0dc2b2d..9e6b77e 100644 (file)
@@ -20,7 +20,7 @@
         <limit bandwidth="50000" pdu="100" search="5" retrieve="50"/>
       </filter>
       <filter type="session_shared"> 
-       <resultset ttl="10" max="3"/>
+       <resultset ttl="10" max="3" optimizesearch="false"/>
        <session ttl="30"/>
       </filter>
       <filter type="log">
index b945abd..4e98e47 100644 (file)
@@ -11,7 +11,8 @@
     </filter>
     <filter id="backend" type="z3950_client">
      <timeout>30</timeout>
-     <default_target>z3950.indexdata.dk</default_target>
+     <default_target>localhost:9999</default_target>
+     <force_close>true</force_close>
     </filter>
   </filters>
   <routes>  
index a52bc4e..3ae07fd 100644 (file)
@@ -11,6 +11,7 @@
       </filter>
       <filter type="log">
         <message>F</message>
+       <category session="true" apdu="true"/>
       </filter>
       <filter type="virt_db">
         <pass-vhosts>true</pass-vhosts>
@@ -54,6 +55,7 @@
       </filter>
       <filter type="log">
         <message>B</message>
+       <category session="true"/>
       </filter>
       <filter type="z3950_client">
         <timeout>30</timeout>
index ef97b7f..0bf7150 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 6256287..2967e5b 100644 (file)
@@ -1,5 +1,5 @@
 ## This file is part of Metaproxy
-## Copyright (C) 2005-2010 Index Data
+## Copyright (C) 2005-2011 Index Data
 
 SUBDIRS = metaproxy
 
index bd00e30..2f48788 100644 (file)
@@ -1,5 +1,5 @@
 ## This file is part of Metaproxy
-## Copyright (C) 2005-2010 Index Data
+## Copyright (C) 2005-2011 Index Data
 
 pkginclude_HEADERS= filter.hpp origin.hpp package.hpp \
        router.hpp session.hpp util.hpp xmlutil.hpp
index 0fbd019..a3310ec 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 29d1124..d9d625c 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 69fbcb7..8800fa3 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 5fdf382..abcfdc0 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 124a8c1..72cc796 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 810afbd..5252d9a 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 5377bb4..ab3556d 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
diff --git a/metaproxy-config.in b/metaproxy-config.in
new file mode 100644 (file)
index 0000000..d9e7f03
--- /dev/null
@@ -0,0 +1,102 @@
+#!/bin/sh
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+echo_cflags=no
+echo_libs=no
+echo_help=no
+echo_tabs=no
+echo_source=yes
+echo_lalibs=no
+src_root=@abs_top_srcdir@
+build_root=@abs_top_builddir@
+
+libs="@YAZPPLIB@ @LIBS@"
+lalibs="@YAZPPLALIB@ @LIBS@"
+VERSION=@VERSION@
+
+usage()
+{
+       cat <<EOF
+Usage: metaproxy-config [OPTIONS] [LIBRARIES]
+Options:
+       [--prefix[=DIR]]
+       [--version]
+       [--libs]
+       [--lalibs]
+       [--cflags]
+EOF
+       exit $1
+}
+
+if test $# -eq 0; then
+       echo_help=yes
+fi
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case $1 in
+    --prefix=*)
+      prefix=$optarg
+      ;;
+    --prefix)
+      echo $prefix
+      exit 0
+      ;;
+    --version)
+      echo $VERSION
+      exit 0
+      ;;
+    --cflags)
+      echo_cflags=yes
+      ;;
+    --libs)
+      echo_libs=yes
+      ;;
+    --tabs)
+      echo_tabs=yes
+      ;;
+    --lalibs)
+      echo_lalibs=yes
+      ;;
+    -*)
+      echo_help=yes
+      ;;
+  esac
+  shift
+done
+
+INC="@YAZPPINC@ @BOOST_CPPFLAGS@"
+
+if test "$echo_source" = "yes"; then
+    LIB="-L${build_root}/src/.libs -lmetaproxy $libs"
+    LALIB="${build_root}/src/libmetaproxy.la $lalibs"
+    INC="-I${src_root}/include $INC"
+else
+    LIB="-lmetaproxy $libs"
+    if test "$prefix" != "/usr"; then
+       LIB="-L${libdir} $LIB"
+    fi
+    LALIB=$LIB
+    if test "$prefix" != "/usr"; then
+       INC="-I${includedir} $INC"
+    fi
+fi
+
+if test "$echo_help" = "yes"; then
+       usage 1 1>&2
+fi
+if test "$echo_cflags" = "yes"; then
+    echo $INC
+fi
+if test "$echo_libs" = "yes"; then
+    echo $LIB
+fi
+if test "$echo_lalibs" = "yes"; then
+    echo $LALIB
+fi
diff --git a/metaproxy.spec b/metaproxy.spec
new file mode 100644 (file)
index 0000000..dda5f84
--- /dev/null
@@ -0,0 +1,115 @@
+Summary: Z39.50/SRU router
+Name: metaproxy
+Version: 1.2.4
+Release: 1indexdata
+License: GPL
+Group: Applications/Internet
+Vendor: Index Data ApS <info@indexdata.dk>
+Source: metaproxy-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Prefix: %{_prefix} /etc/metaproxy
+BuildRequires: pkgconfig, libyazpp4, libxslt-devel, boost-devel
+Packager: Adam Dickmeiss <adam@indexdata.dk>
+URL: http://www.indexdata.com/metaproxy
+Group:  Applications/Internet
+# Requires: 
+
+%description
+Metaproxy daemon.
+
+%package doc
+Summary: Metaproxy documentation
+Group: Documentation
+
+%description doc
+Metaproxy documentation.
+
+%package -n libmetaproxy3
+Summary: Metaproxy library
+Group: Libraries
+Requires: libyazpp4
+
+%description -n libmetaproxy3
+The Metaproxy libraries.
+
+%package -n libmetaproxy3-devel
+Summary: Metaproxy development package
+Group: Development/Libraries
+Requires: libmetaproxy3 = %{version}, libyazpp4-devel, boost-devel
+
+%description -n libmetaproxy3-devel
+Development libraries and include files for the Metaproxy package.
+
+%prep
+%setup
+
+%build
+
+CFLAGS="$RPM_OPT_FLAGS" \
+ ./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} \
+       --enable-shared --with-yazpp=/usr/bin
+make CFLAGS="$RPM_OPT_FLAGS"
+
+%install
+rm -fr ${RPM_BUILD_ROOT}
+make prefix=${RPM_BUILD_ROOT}/%{_prefix} mandir=${RPM_BUILD_ROOT}/%{_mandir} \
+       libdir=${RPM_BUILD_ROOT}/%{_libdir} install
+rm ${RPM_BUILD_ROOT}/%{_libdir}/*.la
+rm -fr ${RPM_BUILD_ROOT}/%{_prefix}/share/metaproxy
+rm -f ${RPM_BUILD_ROOT}/%{_libdir}/metaproxy/*
+mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}/metaproxy/modules
+mkdir -p ${RPM_BUILD_ROOT}/etc/metaproxy/filters-enabled
+mkdir -p ${RPM_BUILD_ROOT}/etc/metaproxy/filters-available
+mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
+mkdir -p ${RPM_BUILD_ROOT}/etc/init.d
+install -m 644 rpm/metaproxy.xml ${RPM_BUILD_ROOT}/etc/metaproxy/metaproxy.xml
+install -m 755 rpm/metaproxy.init ${RPM_BUILD_ROOT}/etc/init.d/metaproxy
+install -m 644 rpm/metaproxy.logrotate  ${RPM_BUILD_ROOT}/etc/logrotate.d/metaproxy
+
+%clean
+rm -fr ${RPM_BUILD_ROOT}
+
+%files -n libmetaproxy3
+%doc README LICENSE NEWS
+%defattr(-,root,root)
+%{_libdir}/*.so.*
+%dir %{_libdir}/metaproxy/modules
+
+%post -n libmetaproxy3 -p /sbin/ldconfig
+
+%postun -n libmetaproxy3 -p /sbin/ldconfig
+
+%files -n libmetaproxy3-devel
+%defattr(-,root,root)
+%{_includedir}/metaproxy
+%{_libdir}/*.so
+%{_libdir}/*.a
+%{_bindir}/metaproxy-config
+
+%files doc
+%defattr(-,root,root)
+%{_prefix}/share/doc/metaproxy
+
+%files
+%defattr(-,root,root)
+%{_bindir}/metaproxy
+%{_mandir}/man?/*
+%config /etc/init.d/metaproxy
+%config(noreplace) /etc/metaproxy/metaproxy.xml
+%dir /etc/metaproxy/filters-available
+%dir /etc/metaproxy/filters-enabled
+%config(noreplace) /etc/logrotate.d/metaproxy
+
+%post
+if [ $1 = 1 ]; then
+        /sbin/chkconfig --add metaproxy
+        /sbin/service metaproxy start > /dev/null 2>&1
+else
+        /sbin/service metaproxy restart > /dev/null 2>&1
+fi
+%preun
+if [ $1 = 0 ]; then
+        /sbin/service metaproxy stop > /dev/null 2>&1
+        /sbin/chkconfig --del metaproxy
+fi
+
diff --git a/rpm/metaproxy.init b/rpm/metaproxy.init
new file mode 100755 (executable)
index 0000000..d303d36
--- /dev/null
@@ -0,0 +1,171 @@
+#!/bin/bash
+#
+# metaproxy    Startup script for Metaproxy
+#
+# chkconfig: 2345 85 15
+# description: Metaproxy SRU/Z39.50 router
+# processname: metaproxy
+# config: /etc/metaproxy/metaproxy.xml
+# config: /etc/sysconfig/metaproxy
+# pidfile: /var/run/metaproxy.pid
+
+### BEGIN INIT INFO
+# Provides:            metaproxy
+# Required-Start:      $local_fs $remote_fs $network
+# Required-Stop:       $local_fs $remote_fs
+# Default-Start:       3 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   Controls the metaproxy daemon
+# Description:         Controls the Metaproxy Z39.50/SRU router.
+### END INIT INFO
+
+
+# start of compatibility layer for RedHat/SuSE init.d
+#
+# rc_status exist on SuSE. Provide dummy if unavailable
+if test -f /etc/rc.status; then
+       . /etc/rc.status
+else
+       rc_status() {
+               r=$?
+               echo ""
+               return $r
+       }
+fi
+
+# functions exist on RedHat. Provide tiny subset if unavailable
+if test -f /etc/rc.d/init.d/functions; then
+       . /etc/rc.d/init.d/functions
+else
+       daemon() {
+               pid_file=""
+               while test $# -gt 0; do
+                       case $1 in
+                               --pidfile)
+                                       pid_file=$2
+                                       shift 2
+                                       ;;
+                               *)
+                                       break;
+                                       ;;
+                       esac
+               done
+               startproc -p $pid_file $*
+       }
+
+       killproc() {
+               pid_file=""
+               delay=10
+               while test $# -gt 0; do
+                       case $1 in
+                               -p)
+                                       pid_file=$2
+                                       shift 2
+                                       ;;
+                               -d)
+                                       delay=$2
+                                       shift 2
+                                       ;;
+                               *)
+                                       break;
+                                       ;;
+                       esac
+               done
+               /sbin/killproc -p $pid_file $*
+       }
+       status() {
+               pid_file=""
+               while test $# -gt 0; do
+                       case $1 in
+                               -p)
+                                       pid_file=$2
+                                       shift 2
+                                       ;;
+                               *)
+                                       break;
+                                       ;;
+                       esac
+               done
+               if test -f $pid_file && kill -0 `cat $pid_file`; then
+                       echo "$DAEMON `cat $pid_file` is running"
+                       return 0
+               fi
+               echo "$DAEMON is not running"
+               return 1
+       }
+fi
+# end of compatibility layer for RedHat/SuSE
+
+OPTIONS="-u nobody -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml"
+
+if [ -f /etc/sysconfig/metaproxy ]; then
+        . /etc/sysconfig/metaproxy
+fi
+
+DAEMON=${DAEMON-/usr/bin/metaproxy}
+prog=metaproxy
+pidfile=${PIDFILE-/var/run/metaproxy.pid}
+lockfile=${LOCKFILE-/var/lock/subsys/metaproxy}
+RETVAL=0
+
+start() {
+        echo -n $"Starting $prog: "
+        daemon --pidfile ${pidfile} $DAEMON $OPTIONS -D -p ${pidfile}
+       rc_status -v
+        RETVAL=$?
+        [ $RETVAL = 0 ] && touch ${lockfile}
+        return $RETVAL
+}
+
+stop() {
+       echo -n $"Stopping $prog: "
+       killproc -p ${pidfile} -d 10 $DAEMON
+       rc_status -v
+       RETVAL=$?
+       [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
+}
+reload() {
+       stop
+       start
+}
+
+# See how we were called.
+case "$1" in
+       start)
+               start
+               ;;
+       stop)
+               stop
+               ;;
+       status)
+               status -p ${pidfile} $DAEMON
+               RETVAL=$?
+               ;;
+       restart)
+               stop
+               start
+               ;;
+       condrestart)
+               if [ -f ${pidfile} ] ; then
+                       stop
+                       start
+               fi
+               ;;
+       reload)
+               reload
+               ;;
+       configtest)
+               $DAEMON $OPTIONS -t
+               RETVAL=$?
+               ;;
+       *)
+               echo $"Usage: $prog {start|stop|restart|help|configtest}"
+               exit 1
+esac
+
+exit $RETVAL
+# Local Variables:
+# mode:shell-script
+# sh-indentation: 8
+# sh-basic-offset: 8
+# End:
diff --git a/rpm/metaproxy.logrotate b/rpm/metaproxy.logrotate
new file mode 100644 (file)
index 0000000..6592e97
--- /dev/null
@@ -0,0 +1,13 @@
+/var/log/metaproxy.log {
+       weekly
+       missingok
+       rotate 4
+       compress
+       delaycompress
+       notifempty
+       postrotate
+               if [ -f /var/run/metaproxy.pid ]; then
+                       /sbin/service metaproxy restart > /dev/null
+               fi
+       endscript
+}
diff --git a/rpm/metaproxy.xml b/rpm/metaproxy.xml
new file mode 100644 (file)
index 0000000..879770d
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
+  <dlpath>/usr/lib64/metaproxy/modules</dlpath>
+  <start route="start"/>
+  <filters>
+    <filter id="frontend" type="frontend_net">
+      <threads>50</threads>
+      <port>@:9000</port>
+    </filter>
+  </filters>
+  <routes>  
+    <route id="start">
+      <filter refid="frontend"/>
+      <filter type="log">
+        <message>log</message>
+      </filter>
+      <include src="filters-enabled/*.xml"/>
+      <filter type="bounce"/>
+    </route>
+  </routes>
+</metaproxy>
+
index ee24046..e7e54f0 100644 (file)
@@ -1,14 +1,18 @@
 ## This file is part of Metaproxy
-## Copyright (C) 2005-2010 Index Data
+## Copyright (C) 2005-2011 Index Data
 
 MAINTAINERCLEANFILES = Makefile.in config.in config.hpp
 
+DISTCLEANFILES = metaproxy-config
+
 AM_CXXFLAGS = $(BOOST_CPPFLAGS)
 
 AM_CPPFLAGS = -I$(top_srcdir)/include
 
 AM_LDFLAGS =
 
+bin_SCRIPTS = metaproxy-config
+
 # Rules for the library..
 
 lib_LTLIBRARIES = libmetaproxy.la
index bdf538d..565b73d 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index c3efe78..46c9a93 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index f91eafb..a446ba2 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 8f02939..4464c32 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 51cb3fc..d34eed6 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 144ed3e..25a48de 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 95b7e91..1767022 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 9dbb511..a381ced 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 9acf1b8..be3503e 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index d14bee2..f5067be 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -258,6 +258,9 @@ void yf::BackendTest::process(Package &package) const
                 else
                     break;
 
+            *resp->preferredMessageSize = *req->preferredMessageSize;
+            *resp->maximumRecordSize = *req->maximumRecordSize;
+
             Session_info info;
             m_p->m_sessions.create(info, package.session());
         }
@@ -368,6 +371,12 @@ void yf::BackendTest::process(Package &package) const
                 *resp->nextResultSetPosition = next_position;
             }
         }
+        else if (apdu_req->which == Z_APDU_close)
+        {
+            apdu_res = odr.create_close(apdu_req,
+                                        Z_Close_finished, 0);
+            package.session().close();
+        }
         else
         {
             apdu_res = odr.create_close(apdu_req,
index b067fa5..bae985c 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 9675190..2b22813 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 5eb8e98..12dda16 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 7cec0cd..fd844c7 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 480e235..f9fd202 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index c1a7057..4fa308f 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 354d6a7..e668a95 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index a9ce43a..5c2738f 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 443ea35..362e489 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index f7720c9..47640ca 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index f9dfb42..e021b03 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 94ddb26..c1a2930 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index a649564..5b64c36 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index e808396..7a3d5e3 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 66fbfa2..183acf8 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index d6166a1..5909fec 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 13957ce..2e128f3 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 9ac2b70..2c5d0d9 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 9c1233f..45ab3e0 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -105,6 +105,7 @@ namespace metaproxy_1 {
             void present(Package &package, Z_APDU *apdu);
             void scan1(Package &package, Z_APDU *apdu);
             void scan2(Package &package, Z_APDU *apdu);
+            void relay_apdu(Package &package, Z_APDU *apdu);
             Rep *m_p;
         };            
         class Multi::Map {
@@ -417,16 +418,22 @@ void yf::Multi::Frontend::init(mp::Package &package, Z_GDU *gdu)
         mp::util::set_vhost_otherinfo(&init_apdu->u.initRequest->otherInfo,
                                        odr, vhost_one);
 
-        Z_InitRequest *req = init_apdu->u.initRequest;
+
+        Z_InitRequest *breq = init_apdu->u.initRequest;
+
+        breq->idAuthentication = req->idAuthentication;
         
-        ODR_MASK_SET(req->options, Z_Options_search);
-        ODR_MASK_SET(req->options, Z_Options_present);
-        ODR_MASK_SET(req->options, Z_Options_namedResultSets);
-        ODR_MASK_SET(req->options, Z_Options_scan);
+        *breq->preferredMessageSize = *req->preferredMessageSize;
+        *breq->maximumRecordSize = *req->maximumRecordSize;
+
+        ODR_MASK_SET(breq->options, Z_Options_search);
+        ODR_MASK_SET(breq->options, Z_Options_present);
+        ODR_MASK_SET(breq->options, Z_Options_namedResultSets);
+        ODR_MASK_SET(breq->options, Z_Options_scan);
         
-        ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_1);
-        ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_2);
-        ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_3);
+        ODR_MASK_SET(breq->protocolVersion, Z_ProtocolVersion_1);
+        ODR_MASK_SET(breq->protocolVersion, Z_ProtocolVersion_2);
+        ODR_MASK_SET(breq->protocolVersion, Z_ProtocolVersion_3);
         
         b->m_package->request() = init_apdu;
 
@@ -443,6 +450,7 @@ void yf::Multi::Frontend::init(mp::Package &package, Z_GDU *gdu)
     ODR_MASK_SET(f_resp->options, Z_Options_search);
     ODR_MASK_SET(f_resp->options, Z_Options_present);
     ODR_MASK_SET(f_resp->options, Z_Options_namedResultSets);
+    ODR_MASK_SET(f_resp->options, Z_Options_scan);
     
     ODR_MASK_SET(f_resp->protocolVersion, Z_ProtocolVersion_1);
     ODR_MASK_SET(f_resp->protocolVersion, Z_ProtocolVersion_2);
@@ -450,6 +458,9 @@ void yf::Multi::Frontend::init(mp::Package &package, Z_GDU *gdu)
 
     int no_failed = 0;
     int no_succeeded = 0;
+
+    Odr_int preferredMessageSize = *req->preferredMessageSize;
+    Odr_int maximumRecordSize = *req->maximumRecordSize;
     for (bit = m_backend_list.begin(); bit != m_backend_list.end(); )
     {
         PackagePtr p = (*bit)->m_package;
@@ -480,7 +491,13 @@ void yf::Multi::Frontend::init(mp::Package &package, Z_GDU *gdu)
                 if (!ODR_MASK_GET(b_resp->protocolVersion, i))
                     ODR_MASK_CLEAR(f_resp->protocolVersion, i);
             if (*b_resp->result)
+            {
                 no_succeeded++;
+                if (preferredMessageSize > *b_resp->preferredMessageSize)
+                    preferredMessageSize = *b_resp->preferredMessageSize;
+                if (maximumRecordSize > *b_resp->maximumRecordSize)
+                    maximumRecordSize = *b_resp->maximumRecordSize;
+            }
             else
                 no_failed++;
         }
@@ -488,6 +505,9 @@ void yf::Multi::Frontend::init(mp::Package &package, Z_GDU *gdu)
             no_failed++;
         bit++;
     }
+    *f_resp->preferredMessageSize = preferredMessageSize;
+    *f_resp->maximumRecordSize = maximumRecordSize;
+
     if (m_p->m_hide_unavailable)
     {
         if (no_succeeded == 0)
@@ -905,6 +925,30 @@ Z_Entry *yf::Multi::ScanTermInfo::get_entry(ODR odr)
     return e;
 }
 
+void yf::Multi::Frontend::relay_apdu(mp::Package &package, Z_APDU *apdu_req)
+{
+    std::list<BackendPtr>::const_iterator bit;
+    for (bit = m_backend_list.begin(); bit != m_backend_list.end(); bit++)
+    {
+        PackagePtr p = (*bit)->m_package;
+        mp::odr odr;
+    
+        p->request() = apdu_req;
+        p->copy_filter(package);
+    }
+    multi_move(m_backend_list);
+    for (bit = m_backend_list.begin(); bit != m_backend_list.end(); bit++)
+    {
+        PackagePtr p = (*bit)->m_package;
+        
+        if (p->session().is_closed()) // if any backend closes, close frontend
+            package.session().close();
+        
+        package.response() = p->response();
+    }
+}
+
+
 void yf::Multi::Frontend::scan2(mp::Package &package, Z_APDU *apdu_req)
 {
     Z_ScanRequest *req = apdu_req->u.scanRequest;
@@ -1172,6 +1216,10 @@ void yf::Multi::process(mp::Package &package) const
         {
             f->scan2(package, apdu);
         }
+        else if (apdu->which == Z_APDU_close)
+        {
+            f->relay_apdu(package, apdu);
+        }
         else
         {
             mp::odr odr;
index 29c9c61..7f3bb6c 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 9d4ac37..1ad7d52 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index f954e6b..a28ef2e 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 64a72bd..f95d040 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index c28cb4e..e3a2016 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index f0f84f7..85d706d 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -190,6 +190,7 @@ namespace metaproxy_1 {
             int m_resultset_ttl;
             int m_resultset_max;
             int m_session_ttl;
+            bool m_optimize_search;
         };
     }
 }
@@ -618,25 +619,28 @@ restart:
     BackendClassPtr bc = m_backend_class;
     {
         boost::mutex::scoped_lock lock(bc->m_mutex_backend_class);
-        // look at each backend and see if we have a similar search
-        BackendInstanceList::const_iterator it = bc->m_backend_list.begin();
         
-        for (; it != bc->m_backend_list.end(); it++)
+        if (m_p->m_optimize_search)
         {
-            if (!(*it)->m_in_use)
+            // look at each backend and see if we have a similar search
+            BackendInstanceList::const_iterator it = bc->m_backend_list.begin();
+            for (; it != bc->m_backend_list.end(); it++)
             {
-                BackendSetList::const_iterator set_it = (*it)->m_sets.begin();
-                for (; set_it != (*it)->m_sets.end(); set_it++)
+                if (!(*it)->m_in_use)
                 {
-                    if ((*set_it)->m_databases == databases 
-                        && query.match(&(*set_it)->m_query))
+                    BackendSetList::const_iterator set_it = (*it)->m_sets.begin();
+                    for (; set_it != (*it)->m_sets.end(); set_it++)
                     {
-                        found_set = *set_it;
-                        found_backend = *it;
-                        bc->use_backend(found_backend);
-                        found_set->timestamp();
-                        // found matching set. No need to search again
-                        return;
+                        if ((*set_it)->m_databases == databases
+                            && query.match(&(*set_it)->m_query))
+                        {
+                            found_set = *set_it;
+                            found_backend = *it;
+                            bc->use_backend(found_backend);
+                            found_set->timestamp();
+                            // found matching set. No need to search again
+                            return;
+                        }
                     }
                 }
             }
@@ -1018,6 +1022,7 @@ yf::SessionShared::Rep::Rep()
     m_resultset_ttl = 30;
     m_resultset_max = 10;
     m_session_ttl = 90;
+    m_optimize_search = true;
 }
 
 void yf::SessionShared::Rep::start()
@@ -1173,6 +1178,11 @@ void yf::SessionShared::configure(const xmlNode *ptr, bool test_only)
                     m_p->m_resultset_max = 
                         mp::xml::get_int(attr->children, 10);
                 }
+                else if (!strcmp((const char *) attr->name, "optimizesearch"))
+                {
+                    m_p->m_optimize_search =
+                        mp::xml::get_bool(attr->children, true);
+                }
                 else
                     throw mp::filter::FilterException(
                         "Bad attribute " + std::string((const char *)
index fdca85a..dffd26e 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index d57c34d..a95f40b 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -368,6 +368,9 @@ yf::SRUtoZ3950::Impl::z3950_init_request(mp::Package &package,
     }
 
     init_req->idAuthentication = auth;
+
+    *init_req->preferredMessageSize = 10*1024*1024;
+    *init_req->maximumRecordSize = 10*1024*1024;
     
     ODR_MASK_SET(init_req->options, Z_Options_search);
     ODR_MASK_SET(init_req->options, Z_Options_present);
index 815182b..993e66b 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 807e101..42ffc44 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 79a389f..2e2ef6f 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 06221d8..8d68ceb 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -79,6 +79,7 @@ namespace metaproxy_1 {
             void search(Package &package, Z_APDU *apdu);
             void present(Package &package, Z_APDU *apdu);
             void scan(Package &package, Z_APDU *apdu);
+            int relay_apdu(Package &package, Z_APDU *apdu);
 
             void close(Package &package);
             typedef std::map<std::string,VirtualDB::Set>::iterator Sets_it;
@@ -212,6 +213,8 @@ yf::VirtualDB::BackendPtr yf::VirtualDB::Frontend::init_backend(
     req->implementationId = org_init->implementationId;
     req->implementationName = org_init->implementationName;
     req->implementationVersion = org_init->implementationVersion;
+    *req->preferredMessageSize = *org_init->preferredMessageSize;
+    *req->maximumRecordSize = *org_init->maximumRecordSize;
 
     ODR_MASK_SET(req->options, Z_Options_search);
     ODR_MASK_SET(req->options, Z_Options_present);
@@ -601,6 +604,27 @@ void yf::VirtualDB::Frontend::present(mp::Package &package, Z_APDU *apdu_req)
     delete id;
 }
 
+int yf::VirtualDB::Frontend::relay_apdu(mp::Package &package, Z_APDU *apdu_req)
+{
+    int no = 0;
+    std::list<BackendPtr>::const_iterator map_it;
+    map_it = m_backend_list.begin();
+    for (; map_it != m_backend_list.end(); map_it++)
+    {
+        BackendPtr b = *map_it;
+        
+        Package relay_package(b->m_backend_session, package.origin());
+        relay_package.copy_filter(package);
+
+        relay_package.request() = yazpp_1::GDU(apdu_req);
+
+        relay_package.move(b->m_route);
+        package.response() = relay_package.response();
+        no++;
+    }
+    return no;
+}
+
 void yf::VirtualDB::Frontend::scan(mp::Package &package, Z_APDU *apdu_req)
 {
     Z_ScanRequest *req = apdu_req->u.scanRequest;
@@ -736,6 +760,9 @@ void yf::VirtualDB::process(mp::Package &package) const
                 else
                     break;
             
+            *resp->preferredMessageSize = *req->preferredMessageSize;
+            *resp->maximumRecordSize = *req->maximumRecordSize;
+
             package.response() = apdu;
             f->m_is_virtual = true;
         }
@@ -770,7 +797,15 @@ void yf::VirtualDB::process(mp::Package &package) const
         }
         else if (apdu->which == Z_APDU_close)
         {
-            package.session().close();
+            if (f->relay_apdu(package, apdu) == 0)
+            {
+                mp::odr odr;
+                
+                package.response() = odr.create_close(
+                    apdu, Z_Close_finished, "virt_db");
+                
+                package.session().close();
+            }
         }
         else
         {
index 3a69d17..e4cb028 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 683c09a..b975f50 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -66,6 +66,7 @@ namespace metaproxy_1 {
             bool m_waiting;
             bool m_destroyed;
             bool m_connected;
+            bool m_has_closed;
             int m_queue_len;
             int m_time_elapsed;
             int m_time_max;
@@ -78,6 +79,7 @@ namespace metaproxy_1 {
             // number of seconds to wait before we give up request
             int m_timeout_sec;
             int m_max_sockets;
+            bool m_force_close;
             std::string m_default_target;
             std::string m_force_target;
             boost::mutex m_mutex;
@@ -99,7 +101,8 @@ yf::Z3950Client::Assoc::Assoc(yazpp_1::SocketManager *socket_manager,
     :  Z_Assoc(PDU_Observable),
        m_socket_manager(socket_manager), m_PDU_Observable(PDU_Observable),
        m_package(0), m_in_use(true), m_waiting(false), 
-       m_destroyed(false), m_connected(false), m_queue_len(1),
+       m_destroyed(false), m_connected(false), m_has_closed(false),
+       m_queue_len(1),
        m_time_elapsed(0), m_time_max(timeout_sec),  m_time_connect_max(10),
        m_host(host)
 {
@@ -185,6 +188,7 @@ yf::Z3950Client::Z3950Client() :  m_p(new yf::Z3950Client::Rep)
 {
     m_p->m_timeout_sec = 30;
     m_p->m_max_sockets = 0;
+    m_p->m_force_close = false;
 }
 
 yf::Z3950Client::~Z3950Client() {
@@ -198,12 +202,6 @@ yf::Z3950Client::Assoc *yf::Z3950Client::Rep::get_assoc(Package &package)
     std::map<mp::Session,yf::Z3950Client::Assoc *>::iterator it;
     
     Z_GDU *gdu = package.request().get();
-    // only deal with Z39.50
-    if (!gdu || gdu->which != Z_GDU_Z3950)
-    {
-        package.move();
-        return 0;
-    }
     
     int max_sockets = package.origin().get_max_sockets();
     if (max_sockets == 0)
@@ -237,6 +235,11 @@ yf::Z3950Client::Assoc *yf::Z3950Client::Rep::get_assoc(Package &package)
             m_cond_session_ready.wait(lock);
         }
     }
+    if (!gdu || gdu->which != Z_GDU_Z3950)
+    {
+        package.move();
+        return 0;
+    }
     // new Z39.50 session ..
     Z_APDU *apdu = gdu->u.z3950;
     // check that it is init. If not, close
@@ -356,16 +359,30 @@ yf::Z3950Client::Assoc *yf::Z3950Client::Rep::get_assoc(Package &package)
 void yf::Z3950Client::Rep::send_and_receive(Package &package,
                                             yf::Z3950Client::Assoc *c)
 {
-    Z_GDU *gdu = package.request().get();
-
     if (c->m_destroyed)
         return;
 
+    c->m_package = &package;
+
+    if (package.session().is_closed() && c->m_connected && !c->m_has_closed
+        && m_force_close)
+    {
+        mp::odr odr;
+            
+        package.request() = odr.create_close(
+            0, Z_Close_finished, "z3950_client");
+        c->m_package = 0; // don't inspect response
+    }
+    Z_GDU *gdu = package.request().get();
+
     if (!gdu || gdu->which != Z_GDU_Z3950)
         return;
 
+    if (gdu->u.z3950->which == Z_APDU_close)
+        c->m_has_closed = true;
+
+    // prepare connect
     c->m_time_elapsed = 0;
-    c->m_package = &package;
     c->m_waiting = true;
     if (!c->m_connected)
     {
@@ -389,7 +406,7 @@ void yf::Z3950Client::Rep::send_and_receive(Package &package,
     int len;
     c->send_GDU(gdu, &len);
 
-    switch(gdu->u.z3950->which)
+    switch (gdu->u.z3950->which)
     {
     case Z_APDU_triggerResourceControlRequest:
         // request only..
@@ -411,12 +428,8 @@ void yf::Z3950Client::Rep::release_assoc(Package &package)
     it = m_clients.find(package.session());
     if (it != m_clients.end())
     {
-        Z_GDU *gdu = package.request().get();
-        if (gdu && gdu->which == Z_GDU_Z3950)
-        {   // only Z39.50 packages lock in get_assoc.. release it
-            it->second->m_in_use = false;
-            it->second->m_queue_len--;
-        }
+        it->second->m_in_use = false;
+        it->second->m_queue_len--;
 
         if (package.session().is_closed())
         {
@@ -440,8 +453,8 @@ void yf::Z3950Client::process(Package &package) const
     if (c)
     {
         m_p->send_and_receive(package, c);
+        m_p->release_assoc(package);
     }
-    m_p->release_assoc(package);
 }
 
 void yf::Z3950Client::configure(const xmlNode *ptr, bool test_only)
@@ -466,6 +479,10 @@ void yf::Z3950Client::configure(const xmlNode *ptr, bool test_only)
         {
             m_p->m_max_sockets = mp::xml::get_int(ptr->children, 0);
         }
+        else if (!strcmp((const char *) ptr->name, "force_close"))
+        {
+            m_p->m_force_close = mp::xml::get_bool(ptr->children, 0);
+        }
         else
         {
             throw mp::filter::FilterException("Bad element " 
index aaf634e..48ebabc 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index fc434e2..2f6160b 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 61774e9..23f93e9 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 864cb61..552cb79 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index ac2b731..eb9a147 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index b598a81..2719870 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -56,23 +56,29 @@ static void sig_term_handler(int s)
 }
 #endif
 
-static void handler(void *data)
+static void handler_debug(void *data)
 {
-    routerp = (mp::RouterFleXML*) data;
-
-#if HAVE_UNISTD_H    
-    /* make the current working process group leader */
-    setpgid(0, 0);
+#if HAVE_UNISTD_H
     process_group = getpgid(0); // save process group ID
     
     signal(SIGTERM, sig_term_handler);
 #endif
+    routerp = (mp::RouterFleXML*) data;
     routerp->start();
 
     mp::Package pack;
     pack.router(*routerp).move(); /* should never exit */
 }
     
+static void handler_normal(void *data)
+{
+#if HAVE_UNISTD_H
+    /* make the current working process group leader */
+    setpgid(0, 0);
+#endif
+    handler_debug(data);
+}
+
 static int sc_main(
     yaz_sc_t s,
     int argc, char **argv)
@@ -199,7 +205,8 @@ static int sc_main(
 
         yaz_sc_running(s);
 
-        yaz_daemon("metaproxy", mode, handler, router, pidfile, uid);
+        yaz_daemon("metaproxy", mode, mode == YAZ_DAEMON_DEBUG ?
+                   handler_debug : handler_normal, router, pidfile, uid);
     }
     catch (std::logic_error &e) {
         yaz_log (YLOG_FATAL,"std::logic error: %s" , e.what() );
index 6168e1a..500a446 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index c628523..df45faf 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index ed078fc..7e7177b 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 0aa9813..75c2726 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index fb87e2d..78fbb74 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 959007b..dee90f1 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 7cb1ff3..153175a 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 59021e8..0a019eb 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 2f208bd..8160de7 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index b0df3af..bc03dda 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 3d8b955..a9b3d66 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 715b845..53a3ab7 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index fdb41a6..20c8061 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 4b14019..088a1ec 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 68f1e9b..ed33113 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index fc08997..5c44f06 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 1eb796e..9c8992b 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 1556c38..b761871 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index e4f62d8..2ecba64 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 727e4b7..945a242 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 9b2626c..796b9b5 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index e0a6f50..fcffab5 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 7567a21..3145aaf 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 5fb1040..e8b051c 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index dec6f98..ff2efb1 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index ed00ff5..b3ef8b5 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 04c3a70..3e66ade 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index b98d547..60b699a 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 3420483..758d695 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index f656278..0059ab1 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 47b9865..a78a751 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 9526e03..bb8ac54 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 0a6130e..0fd49ed 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 320f73c..bde7c3d 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index bafac65..832bd29 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 123ac4a..1adeb19 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index be462cb..ee0213b 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 0e6c50b..9283861 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index 209b7f1..7e3db5a 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2010 Index Data
+   Copyright (C) 2005-2011 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
index d4f8c72..3e396df 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2010, Index Data
+# Copyright (C) 2005-2011 Index Data
 # All rights reserved.
 
 # MS NMAKE makefile for metaproxy
@@ -7,7 +7,7 @@
 DEBUG=0   # 0 for release, 1 for debug
 
 # Metaproxy version
-VERSION=1.1.7
+VERSION=1.2.4
 
 # YAZ and YAZ++ directories
 YAZ_DIR=..\..\yaz
index 12990f0..2eccb00 100644 (file)
@@ -132,6 +132,7 @@ filter_log =
     attribute init-options { xsd:boolean }?,
     attribute request-session { xsd:boolean }?,
     attribute response-session { xsd:boolean }?,
+    attribute session { xsd:boolean }?,
     attribute apdu { xsd:boolean }?,
     attribute request-apdu { xsd:boolean }?,
     attribute response-apdu { xsd:boolean }?
@@ -168,7 +169,8 @@ filter_session_shared =
   attribute name { xsd:NCName }?,
   element mp:resultset {
     attribute max { xsd:integer },
-    attribute ttl { xsd:integer }
+    attribute ttl { xsd:integer },
+    attribute optimizesearch { xsd:boolean }
   }?,
   element mp:session {
     attribute ttl { xsd:integer }
@@ -200,7 +202,8 @@ filter_z3950_client =
   attribute name { xsd:NCName }?,
   element mp:timeout { xsd:integer }?,
   element mp:default_target { xsd:string }?,
-  element mp:force_target { xsd:string }?
+  element mp:force_target { xsd:string }?,
+  element mp:force_close { xsd:boolean }?
 
 filter_limit =
   attribute type { "limit" },
index 3ffd1c4..769fd9d 100644 (file)
           </attribute>
         </optional>
         <optional>
+          <attribute name="session">
+            <data type="boolean"/>
+          </attribute>
+        </optional>
+        <optional>
           <attribute name="apdu">
             <data type="boolean"/>
           </attribute>
         <attribute name="ttl">
           <data type="integer"/>
         </attribute>
+        <attribute name="optimizesearch">
+          <data type="boolean"/>
+        </attribute>
       </element>
     </optional>
     <optional>
         <data type="string"/>
       </element>
     </optional>
+    <optional>
+      <element name="mp:force_close">
+        <data type="boolean"/>
+      </element>
+    </optional>
   </define>
   <define name="filter_limit">
     <attribute name="type">
index 1f1e86e..00dc21b 100644 (file)
       <xs:attribute name="init-options" type="xs:boolean"/>
       <xs:attribute name="request-session" type="xs:boolean"/>
       <xs:attribute name="response-session" type="xs:boolean"/>
+      <xs:attribute name="session" type="xs:boolean"/>
       <xs:attribute name="apdu" type="xs:boolean"/>
       <xs:attribute name="request-apdu" type="xs:boolean"/>
       <xs:attribute name="response-apdu" type="xs:boolean"/>
     <xs:complexType>
       <xs:attribute name="max" use="required" type="xs:integer"/>
       <xs:attribute name="ttl" use="required" type="xs:integer"/>
+      <xs:attribute name="optimizesearch" use="required" type="xs:boolean"/>
     </xs:complexType>
   </xs:element>
   <xs:element name="session">
       <xs:element minOccurs="0" ref="mp:timeout"/>
       <xs:element minOccurs="0" ref="mp:default_target"/>
       <xs:element minOccurs="0" ref="mp:force_target"/>
+      <xs:element minOccurs="0" ref="mp:force_close"/>
     </xs:sequence>
   </xs:group>
   <xs:element name="default_target" type="xs:string"/>
   <xs:element name="force_target" type="xs:string"/>
+  <xs:element name="force_close" type="xs:boolean"/>
   <xs:attributeGroup name="filter_z3950_client">
     <xs:attribute name="type" use="required">
       <xs:simpleType>