projects
/
yazproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow max-sockets in use to a particular target to be configured.
[yazproxy-moved-to-github.git]
/
src
/
yaz-proxy-config.cpp
diff --git
a/src/yaz-proxy-config.cpp
b/src/yaz-proxy-config.cpp
index
bb08a1a
..
edd5d85
100644
(file)
--- a/
src/yaz-proxy-config.cpp
+++ b/
src/yaz-proxy-config.cpp
@@
-1,4
+1,4
@@
-/* $Id: yaz-proxy-config.cpp,v 1.36 2007-04-12 20:50:10 adam Exp $
+/* $Id: yaz-proxy-config.cpp,v 1.37 2007-05-08 12:05:09 adam Exp $
Copyright (c) 1998-2007, Index Data.
This file is part of the yazproxy.
Copyright (c) 1998-2007, Index Data.
This file is part of the yazproxy.
@@
-42,6
+42,7
@@
class Yaz_ProxyConfigP {
int *limit_bw, int *limit_pdu, int *limit_req,
int *limit_search,
int *target_idletime, int *client_idletime,
int *limit_bw, int *limit_pdu, int *limit_req,
int *limit_search,
int *target_idletime, int *client_idletime,
+ int *max_sockets,
int *keepalive_limit_bw, int *keepalive_limit_pdu,
int *pre_init, const char **cql2rpn,
const char **negotiation_charset,
int *keepalive_limit_bw, int *keepalive_limit_pdu,
int *pre_init, const char **cql2rpn,
const char **negotiation_charset,
@@
-231,6
+232,7
@@
void Yaz_ProxyConfigP::return_target_info(xmlNodePtr ptr,
int *limit_search,
int *target_idletime,
int *client_idletime,
int *limit_search,
int *target_idletime,
int *client_idletime,
+ int *max_sockets,
int *keepalive_limit_bw,
int *keepalive_limit_pdu,
int *pre_init,
int *keepalive_limit_bw,
int *keepalive_limit_pdu,
int *pre_init,
@@
-297,6
+299,15
@@
void Yaz_ProxyConfigP::return_target_info(xmlNodePtr ptr,
}
}
if (ptr->type == XML_ELEMENT_NODE
}
}
if (ptr->type == XML_ELEMENT_NODE
+ && !strcmp((const char *) ptr->name, "max-sockets"))
+ {
+ const char *t = get_text(ptr);
+ if (t && max_sockets)
+ {
+ *max_sockets = atoi(t);
+ }
+ }
+ if (ptr->type == XML_ELEMENT_NODE
&& !strcmp((const char *) ptr->name, "cql2rpn"))
{
const char *t = get_text(ptr);
&& !strcmp((const char *) ptr->name, "cql2rpn"))
{
const char *t = get_text(ptr);
@@
-823,7
+834,7
@@
int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name,
}
else if (syntax)
{
}
else if (syntax)
{
- int *match_oid
+ Odr_oid *match_oid
= yaz_string_to_oid_odr(yaz_oid_std(),
CLASS_RECSYN, match_type,
odr);
= yaz_string_to_oid_odr(yaz_oid_std(),
CLASS_RECSYN, match_type,
odr);
@@
-1018,6
+1029,7
@@
int Yaz_ProxyConfig::get_target_no(int no,
limit_bw, limit_pdu, limit_req,
limit_search,
target_idletime, client_idletime,
limit_bw, limit_pdu, limit_req,
limit_search,
target_idletime, client_idletime,
+ 0,
keepalive_limit_bw, keepalive_limit_pdu,
pre_init, cql2rpn,
negotiation_charset, negotiation_lang, target_charset,
keepalive_limit_bw, keepalive_limit_pdu,
pre_init, cql2rpn,
negotiation_charset, negotiation_lang, target_charset,
@@
-1297,6
+1309,7
@@
void Yaz_ProxyConfig::get_target_info(const char *name,
int *limit_search,
int *target_idletime,
int *client_idletime,
int *limit_search,
int *target_idletime,
int *client_idletime,
+ int *max_sockets,
int *max_clients,
int *keepalive_limit_bw,
int *keepalive_limit_pdu,
int *max_clients,
int *keepalive_limit_bw,
int *keepalive_limit_pdu,
@@
-1341,6
+1354,7
@@
void Yaz_ProxyConfig::get_target_info(const char *name,
m_cp->return_target_info(ptr, url, limit_bw, limit_pdu, limit_req,
limit_search,
target_idletime, client_idletime,
m_cp->return_target_info(ptr, url, limit_bw, limit_pdu, limit_req,
limit_search,
target_idletime, client_idletime,
+ max_sockets,
keepalive_limit_bw, keepalive_limit_pdu,
pre_init, cql2rpn,
negotiation_charset, negotiation_lang,
keepalive_limit_bw, keepalive_limit_pdu,
pre_init, cql2rpn,
negotiation_charset, negotiation_lang,