-/* $Id: yaz-proxy.cpp,v 1.35 2005-08-15 12:53:08 adam Exp $
+/* $Id: yaz-proxy.cpp,v 1.38 2005-10-13 09:58:52 adam Exp $
Copyright (c) 1998-2005, Index Data.
This file is part of the yaz-proxy.
m_session_no = 0;
m_bytes_sent = 0;
m_bytes_recv = 0;
- m_bw_hold_PDU = 0;
m_bw_max = 0;
m_pdu_max = 0;
+ m_search_max = 0;
+ m_connect_max = 0;
m_timeout_mode = timeout_normal;
m_timeout_gdu = 0;
m_max_record_retrieve = 0;
m_proxy_negotiation_lang);
// create thread object the first time we get an incoming connection
if (!m_my_thread)
- m_my_thread = new Msg_Thread(m_socket_observable);
+ m_my_thread = new Msg_Thread(m_socket_observable, 1);
new_proxy->m_my_thread = m_my_thread;
return new_proxy;
}
int pre_init = 0;
cfg->get_target_info(proxy_host, url, &m_bw_max,
&m_pdu_max, &m_max_record_retrieve,
+ &m_search_max, &m_connect_max,
&m_target_idletime, &client_idletime,
&parent->m_max_clients,
&m_keepalive_limit_bw,
/* uncomment to force a big reduce */
m_timeout_mode = timeout_reduce;
m_timeout_gdu = gdu;
- // m_bw_hold_PDU = apdu; // save PDU and signal "on hold"
timeout(3); // call us reduce seconds later
return;
#endif
m_timeout_mode = timeout_reduce;
m_timeout_gdu = gdu;
- // m_bw_hold_PDU = apdu; // save PDU and signal "on hold"
timeout(reduce); // call us reduce seconds later
}
else
void Yaz_Proxy::recv_GDU_normal(GDU *gdu)
{
- Z_GDU *apdu = gdu->get();
- gdu->extract_odr_to(odr_decode());
+ Z_GDU *apdu = 0;
+ gdu->move_away_gdu(odr_decode(), &apdu);
delete gdu;
if (apdu->which == Z_GDU_Z3950)
const char *pqf_msg;
size_t off;
int code = yaz_pqf_error (pqf_parser, &pqf_msg, &off);
- yaz_log(YLOG_LOG, "%*s^\n", off+4, "");
+ int ioff = off;
+ yaz_log(YLOG_LOG, "%*s^\n", ioff+4, "");
yaz_log(YLOG_LOG, "Bad PQF: %s (code %d)\n", pqf_msg, code);
send_to_srw_client_error(10, 0);
int i;
const char *name = 0;
const char *zurl_in_use[MAX_ZURL_PLEX];
- int limit_bw, limit_pdu, limit_req;
+ int limit_bw, limit_pdu, limit_req, limit_search, limit_connect;
int target_idletime, client_idletime;
int max_clients;
int keepalive_limit_bw, keepalive_limit_pdu;
for (i = 0; cfg && cfg->get_target_no(i, &name, zurl_in_use,
&limit_bw, &limit_pdu, &limit_req,
+ &limit_search, &limit_connect,
&target_idletime, &client_idletime,
&max_clients,
&keepalive_limit_bw,