From: Adam Dickmeiss Date: Mon, 14 Feb 2011 13:03:26 +0000 (+0100) Subject: Filter virt_db: relay init sz parameters X-Git-Tag: v1.2.5~1^2~12 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=6432549d05e7bd8be568e8e510f227ad66713e3f;p=metaproxy-moved-to-github.git Filter virt_db: relay init sz parameters Filter virt_db relays {preferredMessage,maximumRecord}Size to backend filters and also negotiates to whatever the client suggests, because we don't know that backends are really capable of anyway. --- diff --git a/src/filter_virt_db.cpp b/src/filter_virt_db.cpp index b30e7b4..243f8d7 100644 --- a/src/filter_virt_db.cpp +++ b/src/filter_virt_db.cpp @@ -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; }