X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Ffilter_sru_to_z3950.cpp;h=65481bdc7a31cd521545b019d52a3e6dcd56edb2;hb=f33e9f453cafd768594ff5fdada87e000bb909ae;hp=4fdc80bac2f18597a6861189943cd4b0aa70a2e7;hpb=81d733c7014f85212ff844b8d6e0e2f2bb569022;p=metaproxy-moved-to-github.git diff --git a/src/filter_sru_to_z3950.cpp b/src/filter_sru_to_z3950.cpp index 4fdc80b..65481bd 100644 --- a/src/filter_sru_to_z3950.cpp +++ b/src/filter_sru_to_z3950.cpp @@ -780,7 +780,26 @@ bool yf::SRUtoZ3950::Impl::z3950_present_request( sru_res->records[i + num].recordPacking = record_packing; - if (npr->which == Z_NamePlusRecord_databaseRecord && + if (npr->which == Z_NamePlusRecord_surrogateDiagnostic) + { + Z_DiagRec *p = npr->u.surrogateDiagnostic; + if (p->which == Z_DiagRec_defaultFormat) + { + Z_DefaultDiagFormat *df = p->u.defaultFormat; + int c = yaz_diag_bib1_to_srw(*df->condition); + + yaz_mk_sru_surrogate( + odr_en, sru_res->records + i + num, position, + c, df->u.v2Addinfo); + } + else + { + yaz_mk_sru_surrogate( + odr_en, sru_res->records + i + num, position, + YAZ_SRW_RECORD_TEMPORARILY_UNAVAILABLE, 0); + } + } + else if (npr->which == Z_NamePlusRecord_databaseRecord && npr->u.databaseRecord->direct_reference && !oid_oidcmp(npr->u.databaseRecord->direct_reference, yaz_oid_recsyn_xml))