YAZ++ - A C++ library for YAZ
-$Id: README.txt,v 1.12 2003-10-09 16:06:42 adam Exp $
+$Id: README.txt,v 1.13 2003-10-16 13:40:41 adam Exp $
Introduction
YAZ++ is a C++ layer for YAZ and implements the ANSI Z39.50
protocol for information retrieval (client and server side).
-The YAZ homepage is: http://www.indexdata.dk/yaz/
+The YAZ++ homepage is: http://www.indexdata.dk/yaz++/
YAZ++ uses the same license as YAZ - see LICENSE file for details.
+Documentation
+-------------
+
+Directory sub contains documentation in HTML and PDF. You can
+also read it online at http://www.indexdata.dk/yaz++/
Overview
--------
Control the various optimizations with config..
+Control the various logging facilities APDU, etc. in XML configuration.
+
Handle invalidate sessions (-1 hit, control-number search).
Live status (via search, present).
-Documentation update.
-
SRW/SRU.
-Threading.
+Possible threading.
AC_INIT(configure.in)
-AM_INIT_AUTOMAKE("yaz++",0.7)
+AM_INIT_AUTOMAKE("yaz++",0.7.1)
AC_PROG_CC
AC_PROG_CPP
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: proxy.h,v 1.17 2003-10-16 08:28:10 adam Exp $
+ * $Id: proxy.h,v 1.18 2003-10-16 13:40:41 adam Exp $
*/
#include <yaz++/z-assoc.h>
#define MAX_ZURL_PLEX 10
+#define PROXY_LOG_APDU 1
+#define PROXY_LOG_REQ 1
+
struct Yaz_RecordCache_Entry;
class YAZ_EXPORT Yaz_ProxyConfig {
int *max_clients,
int *keepalive_limit_bw,
int *keepalive_limit_pdu,
- int *pre_init);
+ int *pre_init,
+ int *log_mask);
void get_target_info(const char *name, const char **url,
int *limit_bw, int *limit_pdu, int *limit_req,
int *target_idletime, int *client_idletime,
int *max_clients,
int *keepalive_limit_bw, int *keepalive_limit_pdu,
- int *pre_init);
+ int *pre_init, int *log_mask);
int check_query(ODR odr, const char *name, Z_Query *query, char **addinfo);
int check_syntax(ODR odr, const char *name,
int *limit_bw, int *limit_pdu, int *limit_req,
int *target_idletime, int *client_idletime,
int *keepalive_limit_bw, int *keepalive_limit_pdu,
- int *pre_init);
+ int *pre_init, int *log_mask);
void return_limit(xmlNodePtr ptr,
int *limit_bw, int *limit_pdu, int *limit_req);
int check_type_1(ODR odr, xmlNodePtr ptr, Z_RPNQuery *query,
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-proxy-config.cpp,v 1.9 2003-10-13 19:16:29 adam Exp $
+ * $Id: yaz-proxy-config.cpp,v 1.10 2003-10-16 13:40:41 adam Exp $
*/
#include <ctype.h>
int *client_idletime,
int *keepalive_limit_bw,
int *keepalive_limit_pdu,
- int *pre_init)
+ int *pre_init,
+ int *log_mask)
{
*pre_init = 0;
int no_url = 0;
for (; ptr; ptr = ptr->next)
{
if (ptr->type == XML_ELEMENT_NODE
+ && !strcmp((const char *) ptr->name, "log"))
+ {
+ const char *v = get_text(ptr);
+ *log_mask = 0;
+ while (v && *v)
+ {
+ const char *cp = v;
+ while (*cp && *cp != ',' && !isspace(*cp))
+ cp++;
+ size_t len = cp - v;
+ if (len == 4 && !memcmp(v, "apdu", 4))
+ *log_mask |= PROXY_LOG_APDU;
+ if (len == 3 && !memcmp(v, "req", 3))
+ *log_mask |= PROXY_LOG_REQ;
+ if (isdigit(*v))
+ *log_mask |= atoi(v);
+ if (*cp == ',')
+ cp++;
+ while (*cp && isspace(*cp))
+ cp++;
+ v = cp;
+ }
+ }
+ if (ptr->type == XML_ELEMENT_NODE
&& !strcmp((const char *) ptr->name, "preinit"))
{
const char *v = get_text(ptr);
int *max_clients,
int *keepalive_limit_bw,
int *keepalive_limit_pdu,
- int *pre_init)
+ int *pre_init,
+ int *log_mask)
{
#if HAVE_XML2
xmlNodePtr ptr;
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, log_mask);
return 1;
}
i++;
int *max_clients,
int *keepalive_limit_bw,
int *keepalive_limit_pdu,
- int *pre_init)
+ int *pre_init,
+ int *log_mask)
{
#if HAVE_XML2
xmlNodePtr ptr;
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, log_mask);
}
#else
*url = name;
* Copyright (c) 1998-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-proxy.cpp,v 1.60 2003-10-16 08:28:10 adam Exp $
+ * $Id: yaz-proxy.cpp,v 1.61 2003-10-16 13:40:41 adam Exp $
*/
#include <assert.h>
proxy_host = m_default_target;
}
int client_idletime = -1;
- int pre_init = 0;
url[0] = m_default_target;
url[1] = 0;
if (cfg)
+ {
+ int pre_init = 0;
+ int log_mask = 0;
cfg->get_target_info(proxy_host, url, &m_bw_max,
&m_pdu_max, &m_max_record_retrieve,
&m_target_idletime, &client_idletime,
&parent->m_max_clients,
&m_keepalive_limit_bw,
&m_keepalive_limit_pdu,
- &pre_init);
+ &pre_init, &log_mask);
+ }
if (client_idletime != -1)
{
m_client_idletime = client_idletime;
int max_clients;
int keepalive_limit_bw, keepalive_limit_pdu;
int pre_init;
+ int log_mask = 0;
Yaz_ProxyConfig *cfg = check_reconfigure();
&max_clients,
&keepalive_limit_bw,
&keepalive_limit_pdu,
- &pre_init) ; i++)
+ &pre_init, &log_mask) ; i++)
{
if (pre_init)
{