option -n for yaz-proxy. Log the number of max files with getrlimit always.
-Fixed SEGV bug that occured when duplicate init requests was received and
-no cached init response was available.
+For yaz-proxy, allow maximum number of files to be specified (setrlimit) with
+option -n for yaz-proxy. Log the number of max files with getrlimit always.
-Add MODS version 3 conversion, MARC21slim2MODS3.xsl. Update voyager.xml,
-config.xml to use it. Default "mods" is still MODS v2.
+For yaz-proxy, fixed SEGV bug that occured when duplicate init requests was received and no cached init response was available.
+
+For yaz-proxy, added MODS version 3 conversion, MARC21slim2MODS3.xsl.
+Updated voyager.xml, config.xml to use it. Default "mods" is still MODS v2.
--- 0.7.7 2004/02/10 Internal release.
Make proxy perform keepalive when receiving SIGBUS.
-Fix problem with fixup of referenceId's.
+For yaz-proxy, fixed problem with fixup of referenceId's.
--- 0.7.6 2004/02/05 Internal release.
-Force correct referenceID's.
+For yaz-proxy, force correct referenceID's.
-Log libxml2/libxslt errors in yaz log.
+For yaz-proxy, log libxml2/libxslt errors in yaz log.
-Update proxy to work with SRW diagnostic code as a URI/string.
+Update yaz-proxy to work with SRW diagnostic code as a URI/string.
Proxy now throws 'unsupported transfer syntax' / 'unsupported ESN' properly.
-Multiple explain records may exist for one target. Proxy checks contents of
-database element in explain record to validate database.
+For yaz-proxy, multiple explain records may exist for one target.
+Proxy checks contents of database element in explain record to
+validate database.
--- 0.7.5 2004/01/15 Internal release.
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-proxy-main.cpp,v 1.33 2004-02-12 17:17:31 adam Exp $
+ * $Id: yaz-proxy-main.cpp,v 1.34 2004-02-16 10:47:37 adam Exp $
*/
#include <signal.h>
static char *uid = 0;
static char *log_file = 0;
static int debug = 0;
+static int no_limit_files = 0;
int args(Yaz_Proxy *proxy, int argc, char **argv)
{
char *prog = argv[0];
int ret;
- while ((ret = options("o:a:t:v:c:u:i:m:l:T:p:U:X",
+ while ((ret = options("o:a:t:v:c:u:i:m:l:T:p:U:n:X",
argv, argc, &arg)) != -2)
{
int err;
case 'T':
proxy->set_target_idletime(atoi(arg));
break;
+ case 'n':
+ no_limit_files = atoi(arg);
+ break;
case 'X':
debug = 1;
break;
xmlSetGenericErrorFunc(0, proxy_xml_error_handler);
#endif
yaz_log(LOG_LOG, "0 proxy run=%d pid=%ld", run, (long) getpid());
+
+ if (no_limit_files)
+ {
+#if HAVE_SETRLIMIT
+ struct rlimit limit_data;
+ limit_data.rlim_cur = no_limit_files;
+ limit_data.rlim_max = no_limit_files;
+
+ yaz_log(LOG_LOG, "0 setrlimit NOFILE cur=%d max=%d",
+ limit_data.rlim_cur, limit_data.rlim_max);
+ if (setrlimit(RLIMIT_NOFILE, &limit_data))
+ yaz_log(LOG_ERRNO|LOG_WARN, "setrlimit");
+#else
+ yaz_log(LOG_WARN, "setrlimit unavablable. Option -n ignored");
+#endif
+ }
if (pid_fname)
{
FILE *f = fopen(pid_fname, "w");
xfree(uid);
}
#if HAVE_GETRLIMIT
- struct rlimit limit_data;
- getrlimit(RLIMIT_NOFILE, &limit_data);
- yaz_log(LOG_LOG, "0 get limit NOFILE cur=%d max=%d",
- limit_data.rlim_cur, limit_data.rlim_max);
+ struct rlimit limit_data;
+ getrlimit(RLIMIT_NOFILE, &limit_data);
+ yaz_log(LOG_LOG, "0 getrlimit NOFILE cur=%d max=%d",
+ limit_data.rlim_cur, limit_data.rlim_max);
#endif
-
+
while (m->processEvent() > 0)
;
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-proxy.cpp,v 1.101 2004-02-15 16:41:14 adam Exp $
+ * $Id: yaz-proxy.cpp,v 1.102 2004-02-16 10:47:37 adam Exp $
*/
#include <assert.h>
ODR_MASK_SET(apdu->u.initRequest->options, i);
ODR_MASK_CLEAR(apdu->u.initRequest->options,
Z_Options_negotiationModel);
+ ODR_MASK_CLEAR(apdu->u.initRequest->options,
+ Z_Options_concurrentOperations);
// make new version
m_initRequest_version = apdu->u.initRequest->protocolVersion;
ODR_MASK_SET(req->options, i);
ODR_MASK_CLEAR(apdu->u.initRequest->options,
Z_Options_negotiationModel);
+ ODR_MASK_CLEAR(apdu->u.initRequest->options,
+ Z_Options_concurrentOperations);
for (i = 0; i<= 10; i++)
ODR_MASK_SET(req->protocolVersion, i);