X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fyaz-proxy-main.cpp;h=b439ba42777a03492eca7d904c30670c309b521d;hb=eb2b00deb4ecc5a3fbfbef11f57790c1659ab3e2;hp=c44183e69b71ca415389ddf4916ef28478a96a51;hpb=c176a974d0fbd65b6dd10369209eb1ddabf41aa7;p=yazproxy-moved-to-github.git diff --git a/src/yaz-proxy-main.cpp b/src/yaz-proxy-main.cpp index c44183e..b439ba4 100644 --- a/src/yaz-proxy-main.cpp +++ b/src/yaz-proxy-main.cpp @@ -1,5 +1,5 @@ -/* $Id: yaz-proxy-main.cpp,v 1.6 2004-11-30 21:10:45 adam Exp $ - Copyright (c) 1998-2004, Index Data. +/* $Id: yaz-proxy-main.cpp,v 1.14 2005-06-02 06:40:46 adam Exp $ + Copyright (c) 1998-2005, Index Data. This file is part of the yaz-proxy. @@ -19,22 +19,30 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef WIN32 -#else #include +#if HAVE_UNISTD_H #include -#include #endif +#if HAVE_SYS_TYPES_H #include - -#include - -#if HAVE_GETRLIMIT +#endif +#if HAVE_SYS_TIME_H #include +#endif +#if HAVE_SYS_WAIT_H +#include +#endif +#if HAVE_SYS_RESOURCE_H #include #endif +#if HAVE_PWD_H +#include +#endif -#include +#include +#include + +#include #include #include @@ -48,6 +56,8 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #endif +using namespace yazpp_1; + void usage(char *prog) { fprintf (stderr, "%s: [-c config] [-l log] [-a log] [-v level] [-t target] " @@ -68,7 +78,7 @@ 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:n:X", + while ((ret = options("o:a:t:v:c:u:i:m:l:T:p:n:X", argv, argc, &arg)) != -2) { int err; @@ -86,7 +96,7 @@ int args(Yaz_Proxy *proxy, int argc, char **argv) err = proxy->set_config(arg); if (err == -2) { - fprintf(stderr, "Config file support not enabled (proxy not compiled with libxml2 support)\n"); + fprintf(stderr, "Config file support not enabled (not using libxslt & libxml2)\n"); exit(1); } else if (err == -1) @@ -101,9 +111,6 @@ int args(Yaz_Proxy *proxy, int argc, char **argv) case 't': proxy->set_default_target(arg); break; - case 'U': - proxy->set_proxy_authentication(arg); - break; case 'o': proxy->option("optimize", arg); break; @@ -127,6 +134,7 @@ int args(Yaz_Proxy *proxy, int argc, char **argv) no_limit_files = atoi(arg); break; case 'X': + proxy->set_debug_mode(1); debug = 1; break; case 'p': @@ -277,7 +285,7 @@ int main(int argc, char **argv) int cont = 1; int run = 1; Yaz_SocketManager mySocketManager; - Yaz_Proxy proxy(new Yaz_PDU_Assoc(&mySocketManager)); + Yaz_Proxy proxy(new Yaz_PDU_Assoc(&mySocketManager), &mySocketManager); static_yaz_proxy = &proxy;