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
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
Record(Z_NamePlusRecord *n, const char *namespaces,
const char *expr, bool debug);
~Record();
Record(Z_NamePlusRecord *n, const char *namespaces,
const char *expr, bool debug);
~Record();
*p_req->numberOfRecordsRequested = end_pos - pos + 1;
p_req->preferredRecordSyntax = syntax;
p_req->resultSetId = odr_strdup(odr, resultSetId);
*p_req->numberOfRecordsRequested = end_pos - pos + 1;
p_req->preferredRecordSyntax = syntax;
p_req->resultSetId = odr_strdup(odr, resultSetId);
mp::odr odr;
Odr_oid *syntax = 0;
if (req->preferredRecordSyntax)
syntax = odr_oiddup(odr, req->preferredRecordSyntax);
mp::odr odr;
Odr_oid *syntax = 0;
if (req->preferredRecordSyntax)
syntax = odr_oiddup(odr, req->preferredRecordSyntax);
- package.move();
- Z_GDU *gdu_res = package.response().get();
+
+ Package b_package(package.session(), package.origin());
+ b_package.copy_filter(package);
+ b_package.request() = apdu_req;
+ b_package.move();
+
+ Z_GDU *gdu_res = b_package.response().get();
if (gdu_res && gdu_res->which == Z_GDU_Z3950 && gdu_res->u.z3950->which ==
Z_APDU_searchResponse)
{
Z_SearchResponse *res = gdu_res->u.z3950->u.searchResponse;
if (gdu_res && gdu_res->which == Z_GDU_Z3950 && gdu_res->u.z3950->which ==
Z_APDU_searchResponse)
{
Z_SearchResponse *res = gdu_res->u.z3950->u.searchResponse;
s->hit_count = *res->resultCount;
handle_records(b_package, apdu_req, res->records, 1, s,
s->hit_count = *res->resultCount;
handle_records(b_package, apdu_req, res->records, 1, s,
}
void yf::Sort::Frontend::handle_present(mp::Package &package, Z_APDU *apdu_req)
{
Z_PresentRequest *req = apdu_req->u.presentRequest;
std::string resultSetId = req->resultSetId;
}
void yf::Sort::Frontend::handle_present(mp::Package &package, Z_APDU *apdu_req)
{
Z_PresentRequest *req = apdu_req->u.presentRequest;
std::string resultSetId = req->resultSetId;
if (req->preferredRecordSyntax)
syntax = odr_oiddup(odr, req->preferredRecordSyntax);
if (req->preferredRecordSyntax)
syntax = odr_oiddup(odr, req->preferredRecordSyntax);
Z_GDU *gdu_res = package.response().get();
if (gdu_res && gdu_res->which == Z_GDU_Z3950 && gdu_res->u.z3950->which ==
Z_APDU_presentResponse)
{
Z_PresentResponse *res = gdu_res->u.z3950->u.presentResponse;
handle_records(b_package, apdu_req, res->records,
Z_GDU *gdu_res = package.response().get();
if (gdu_res && gdu_res->which == Z_GDU_Z3950 && gdu_res->u.z3950->which ==
Z_APDU_presentResponse)
{
Z_PresentResponse *res = gdu_res->u.z3950->u.presentResponse;
handle_records(b_package, apdu_req, res->records,
- start, rset, syntax, resultSetId.c_str());
+ start, rset, syntax, req->recordComposition,
+ resultSetId.c_str());