Filter virt_db: relay init sz parameters
[metaproxy-moved-to-github.git] / src / filter_virt_db.cpp
index 06221d8..243f8d7 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
@@ -212,6 +212,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);
@@ -736,6 +738,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;
         }