X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-proxy-config.cpp;h=b824462e17b4f21286d853743835b0092f1407bf;hb=4c287a6c8de2a59e1b9d249c0166bfb6c37cd571;hp=c4ed43d591c361223b77dc12ee9c070a519d003b;hpb=7e3e46d9a207d1c6d56704b64c2ebee58b170795;p=yazpp-moved-to-github.git diff --git a/src/yaz-proxy-config.cpp b/src/yaz-proxy-config.cpp index c4ed43d..b824462 100644 --- a/src/yaz-proxy-config.cpp +++ b/src/yaz-proxy-config.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2003, Index Data. * See the file LICENSE for details. * - * $Id: yaz-proxy-config.cpp,v 1.14 2003-11-25 21:54:18 adam Exp $ + * $Id: yaz-proxy-config.cpp,v 1.16 2003-12-20 22:44:30 adam Exp $ */ #include @@ -117,7 +117,9 @@ void Yaz_ProxyConfig::return_target_info(xmlNodePtr ptr, int *client_idletime, int *keepalive_limit_bw, int *keepalive_limit_pdu, - int *pre_init) + int *pre_init, + const char **cql2rpn, + const char **zeerex) { *pre_init = 0; int no_url = 0; @@ -174,6 +176,20 @@ void Yaz_ProxyConfig::return_target_info(xmlNodePtr ptr, *client_idletime = 0; } } + if (ptr->type == XML_ELEMENT_NODE + && !strcmp((const char *) ptr->name, "cql2rpn")) + { + const char *t = get_text(ptr); + if (t) + *cql2rpn = t; + } + if (ptr->type == XML_ELEMENT_NODE + && !strcmp((const char *) ptr->name, "zeerex")) + { + const char *t = get_text(ptr); + if (t) + *zeerex = t; + } } } #endif @@ -469,7 +485,9 @@ int Yaz_ProxyConfig::get_target_no(int no, int *max_clients, int *keepalive_limit_bw, int *keepalive_limit_pdu, - int *pre_init) + int *pre_init, + const char **cql2rpn, + const char **zeerex) { #if HAVE_XML2 xmlNodePtr ptr; @@ -494,7 +512,7 @@ int Yaz_ProxyConfig::get_target_no(int no, return_target_info(ptr, url, limit_bw, limit_pdu, limit_req, target_idletime, client_idletime, keepalive_limit_bw, keepalive_limit_pdu, - pre_init); + pre_init, cql2rpn, zeerex); return 1; } i++; @@ -572,7 +590,9 @@ void Yaz_ProxyConfig::get_target_info(const char *name, int *max_clients, int *keepalive_limit_bw, int *keepalive_limit_pdu, - int *pre_init) + int *pre_init, + const char **cql2rpn, + const char **zeerex) { #if HAVE_XML2 xmlNodePtr ptr; @@ -608,7 +628,7 @@ void Yaz_ProxyConfig::get_target_info(const char *name, return_target_info(ptr, url, limit_bw, limit_pdu, limit_req, target_idletime, client_idletime, keepalive_limit_bw, keepalive_limit_pdu, - pre_init); + pre_init, cql2rpn, zeerex); } #else *url = name;