From: Adam Dickmeiss Date: Wed, 18 Jan 2006 14:36:15 +0000 (+0000) Subject: Merger scan returns diagnostics X-Git-Tag: YP2.0.0.2~8 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=d6af36a9a92973976dfcfd906529567265c4fe80;p=metaproxy-moved-to-github.git Merger scan returns diagnostics --- diff --git a/src/filter_multi.cpp b/src/filter_multi.cpp index a339959..03916ba 100644 --- a/src/filter_multi.cpp +++ b/src/filter_multi.cpp @@ -1,4 +1,4 @@ -/* $Id: filter_multi.cpp,v 1.9 2006-01-18 14:10:47 adam Exp $ +/* $Id: filter_multi.cpp,v 1.10 2006-01-18 14:36:15 adam Exp $ Copyright (c) 2005, Index Data. %LICENSE% @@ -807,6 +807,23 @@ void yf::Multi::Frontend::scan2(Package &package, Z_APDU *apdu_req) Z_APDU_scanResponse) { Z_ScanResponse *res = gdu->u.z3950->u.scanResponse; + + if (res->entries && res->entries->nonsurrogateDiagnostics) + { + // failure + yp2::odr odr; + Z_APDU *f_apdu = odr.create_scanResponse(apdu_req, 1, 0); + Z_ScanResponse *f_res = f_apdu->u.scanResponse; + + f_res->entries->nonsurrogateDiagnostics = + res->entries->nonsurrogateDiagnostics; + f_res->entries->num_nonsurrogateDiagnostics = + res->entries->num_nonsurrogateDiagnostics; + + package.response() = f_apdu; + return; + } + if (res->entries && res->entries->entries) { Z_Entry **entries = res->entries->entries;