X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fyaz-proxy.cpp;h=6cb13ea62dd74433cb2b31cf5c6a01cb6520794b;hb=8b411b4b9b846527252b68ccb660bdde1421c01a;hp=e17b2ef096e8e01660ddf0e53eec0ea556d848da;hpb=9f2b5252885fdfbdae2c77f52ff3852ae0818111;p=yazproxy-moved-to-github.git diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index e17b2ef..6cb13ea 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -533,10 +533,8 @@ const char *Yaz_Proxy::load_balance(const char **url) } } int min_use = 100000; - int spare_for_min = 0; int max_spare = 0; const char *ret_min = 0; - const char *ret_spare = 0; for (i = 0; url[i]; i++) { yaz_log(YLOG_DEBUG, "%szurl=%s use=%d spare=%d", @@ -545,11 +543,9 @@ const char *Yaz_Proxy::load_balance(const char **url) { ret_min = url[i]; min_use = zurl_in_use[i]; - spare_for_min = zurl_in_spare[i]; } if (max_spare < zurl_in_spare[i]) { - ret_spare = url[i]; max_spare = zurl_in_spare[i]; } } @@ -2593,13 +2589,13 @@ Z_APDU *Yaz_Proxy::handle_query_validation(Z_APDU *apdu) int err = 0; char *addinfo = 0; +#if 0 Yaz_ProxyConfig *cfg = check_reconfigure(); // Something like this needs to be implemented later: -/* if (cfg) err = cfg->check_type_1_attributes(odr_encode(), m_default_target, sr->termListAndStartPoint->attributes, &addinfo); -*/ +#endif if (err) { Z_APDU *new_apdu = create_Z_PDU(Z_APDU_scanResponse); @@ -2776,8 +2772,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 +2851,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;