<?xml version="1.0"?>
-<!-- $Id: config.xml,v 1.13 2003-10-20 18:31:43 adam Exp $ -->
+<!-- $Id: config.xml,v 1.14 2003-10-23 08:46:55 adam Exp $ -->
<proxy>
<target default="1" name="voyager">
<!-- default target -->
- <url>z3950.loc.gov:7090</url>
- <url>z3950.loc.gov:7094</url>
+ <url>bagel.indexdata.dk</url>
+ <target-timeout>240</target-timeout>
+ <client-timeout>180</client-timeout>
<keepalive>
- <bandwidth>500000</bandwidth>
- <pdu>500</pdu>
+ <bandwidth>1000000</bandwidth>
+ <pdu>1000</pdu>
</keepalive>
- <limit><!-- limits .. -->
- <bandwidth>200000</bandwidth>
- <pdu>31</pdu>
- <retrieve>20</retrieve>
+ <limit><!-- per minute limits .. -->
+ <bandwidth>2000000</bandwidth>
+ <pdu>50</pdu>
+ <retrieve>100</retrieve>
</limit>
<attribute type="1" value="1-11,13-1010"/>
<attribute type="1" value="*" error="114"/>
- <target-timeout>240</target-timeout>
- <client-timeout>180</client-timeout>
+ <syntax type="opac"/>
<syntax type="usmarc"/>
+ <syntax type="none"/>
<syntax type="xml" marcxml="1"/>
<syntax type="*" error="238"/>
- <preinit>2</preinit>
+ <preinit>0</preinit>
</target>
<target name="localhost">
<url>localhost:9999</url>
+ <url>localhost:9998</url>
+ <target-timeout>300</target-timeout>
+ <client-timeout>180</client-timeout>
<keepalive/> <!-- keepalive enabled -->
<limit><!-- limits .. -->
<bandwidth>50000</bandwidth>
<pdu>60</pdu>
<retrieve>10</retrieve>
</limit>
- <target-timeout>300</target-timeout>
- <client-timeout>180</client-timeout>
- <attribute type="1" value="10,1023-9000" error="114"/>
+ <attribute type="1" value="1-1023">
+ <attribute type="1" value="*" error="114"/>
<syntax type="usmarc"/>
<syntax type="grs1"/>
<syntax type="xml" marcxml="1"/>
+ <syntax type="none"/>
<syntax type="*" error="238"/>
- <preinit>0</preinit>
+ <preinit>2</preinit>
</target>
<target name="*">
<!-- everything else -->
</target>
- <max-clients>500</max-clients>
- <xlog>client-apdu server-apdu</xlog>
+ <max-clients>50</max-clients>
+ <log>client-apdu server-apdu</log>
</proxy>
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-pdu-assoc.cpp,v 1.35 2003-10-20 18:31:44 adam Exp $
+ * $Id: yaz-pdu-assoc.cpp,v 1.36 2003-10-23 08:46:55 adam Exp $
*/
#include <assert.h>
m_socketObservable = socketObservable;
m_PDU_Observer = 0;
m_queue_out = 0;
+ m_queue_in = 0;
m_input_buf = 0;
m_input_len = 0;
m_children = 0;
if (!m_PDU_Observer)
return;
-
+#if 0
+ PDU_Queue **pq = &m_queue_in;
+ while (*pq)
+ pq = &(*pq)->m_next;
+
+ *pq = new PDU_Queue(m_input_buf, res);
+#else
m_PDU_Observer->recv_PDU(m_input_buf, res);
+#endif
if (destroyed) // it really was destroyed, return now.
return;
m_destroyed = 0;
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-proxy.cpp,v 1.63 2003-10-20 18:31:44 adam Exp $
+ * $Id: yaz-proxy.cpp,v 1.64 2003-10-23 08:46:55 adam Exp $
*/
#include <assert.h>
!strcmp(m_proxyTarget, c->get_hostname()))
{
// found it in cache
- yaz_log (LOG_LOG, "%sREUSE %d %d %s",
- m_session_str,
- c->m_seqno, parent->m_seqno, c->get_hostname());
+ yaz_log (LOG_LOG, "%sREUSE %s",
+ m_session_str, c->get_hostname());
c->m_seqno = parent->m_seqno;
assert(c->m_server == 0);
if (apdu->which == Z_APDU_presentRequest)
{
Z_PresentRequest *pr = apdu->u.presentRequest;
- Z_NamePlusRecordList *npr;
int toget = *pr->numberOfRecordsRequested;
int start = *pr->resultSetStartPoint;
send_to_client(new_apdu);
return 0;
}
+#if 0
if (!strcmp(m_client->m_last_resultSetId, pr->resultSetId))
{
if (start+toget-1 > m_client->m_last_resultCount)
return 0;
}
}
+#endif
}
if (apdu->which != Z_APDU_searchRequest)
if (apdu->which == Z_APDU_searchRequest)
{
Z_SearchRequest *sr = apdu->u.searchRequest;
- if (*sr->smallSetUpperBound > 0 || *sr->mediumSetPresentNumber > 0)
+ int err = 0;
+ char *addinfo = 0;
+ Yaz_ProxyConfig *cfg = check_reconfigure();
+
+ if (cfg)
+ err = cfg->check_syntax(odr_encode(),
+ m_default_target,
+ sr->preferredRecordSyntax,
+ &addinfo);
+ if (err == -1)
{
- int err = 0;
- char *addinfo = 0;
- Yaz_ProxyConfig *cfg = check_reconfigure();
-
- if (cfg)
- err = cfg->check_syntax(odr_encode(),
- m_default_target,
- sr->preferredRecordSyntax,
- &addinfo);
- if (err == -1)
- {
- sr->preferredRecordSyntax =
- yaz_oidval_to_z3950oid(odr_decode(), CLASS_RECSYN,
- VAL_USMARC);
- m_marcxml_flag = 1;
- }
- else if (err)
- {
- Z_APDU *new_apdu = create_Z_PDU(Z_APDU_searchResponse);
-
- new_apdu->u.searchResponse->referenceId = sr->referenceId;
- new_apdu->u.searchResponse->records =
- create_nonSurrogateDiagnostics(odr_encode(), err, addinfo);
- *new_apdu->u.searchResponse->searchStatus = 0;
-
- send_to_client(new_apdu);
-
- return 0;
- }
+ sr->preferredRecordSyntax =
+ yaz_oidval_to_z3950oid(odr_decode(), CLASS_RECSYN,
+ VAL_USMARC);
+ m_marcxml_flag = 1;
+ }
+ else if (err)
+ {
+ Z_APDU *new_apdu = create_Z_PDU(Z_APDU_searchResponse);
+
+ new_apdu->u.searchResponse->referenceId = sr->referenceId;
+ new_apdu->u.searchResponse->records =
+ create_nonSurrogateDiagnostics(odr_encode(), err, addinfo);
+ *new_apdu->u.searchResponse->searchStatus = 0;
+
+ send_to_client(new_apdu);
+
+ return 0;
}
}
else if (apdu->which == Z_APDU_presentRequest)