From 84a66ec6eb9b25953cbdcf61c97ecc57c45066c4 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 29 Nov 2012 09:45:00 +0100 Subject: [PATCH] Empty backendelementset results in no elementset transmitted to backend. --- src/yaz-proxy.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index e17b2ef..6865413 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -2776,8 +2776,10 @@ Z_APDU *Yaz_Proxy::handle_syntax_validation(Z_APDU *apdu) } if (m_backend_elementset) { - Z_ElementSetNames *esn = mk_esn_from_schema(odr_encode(), - m_backend_elementset); + Z_ElementSetNames *esn = + mk_esn_from_schema( + odr_encode(), + *m_backend_elementset ? m_backend_elementset : 0); sr->smallSetElementSetNames = esn; sr->mediumSetElementSetNames = esn; } @@ -2853,8 +2855,10 @@ Z_APDU *Yaz_Proxy::handle_syntax_validation(Z_APDU *apdu) } if (m_backend_elementset) { - Z_ElementSetNames *esn = mk_esn_from_schema(odr_encode(), - m_backend_elementset); + Z_ElementSetNames *esn = + mk_esn_from_schema( + odr_encode(), + *m_backend_elementset ? m_backend_elementset : 0); Z_RecordComposition *comp = (Z_RecordComposition *) odr_malloc(odr_encode(), sizeof(Z_RecordComposition)); comp->which = Z_RecordComp_simple; -- 1.7.10.4