diff options
author | adam <adam@pkgsrc.org> | 2017-02-06 14:14:48 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2017-02-06 14:14:48 +0000 |
commit | f7b6ee96c80996b47540584ba4b820a887a947c5 (patch) | |
tree | fdfddefe14e52bcb88e90d86f9ad074388d03c53 /www/c-icap | |
parent | 3c1606cff5909c864cffbb098f41ac6570e7a581 (diff) | |
download | pkgsrc-f7b6ee96c80996b47540584ba4b820a887a947c5.tar.gz |
c-icap-0.4.4 changes:
Fix c-icap.conf installation and build problems
Fix c-icap build problem when poll is disabled
Bug fix: body->unlocked can be greater than the body->readpos causing segfault
to c-icap
Handle correctly missing proxy-user header in the case the RemoteProxyUsers is
enabled
Bug fix: Unexpected error waiting for or reading events in control socket!
ci_client_icapfilter does not send correct eof line on zero-sized files
Diffstat (limited to 'www/c-icap')
-rw-r--r-- | www/c-icap/Makefile | 5 | ||||
-rw-r--r-- | www/c-icap/PLIST | 4 | ||||
-rw-r--r-- | www/c-icap/distinfo | 22 | ||||
-rw-r--r-- | www/c-icap/patches/patch-Makefile.in | 8 | ||||
-rw-r--r-- | www/c-icap/patches/patch-aserver.c | 46 | ||||
-rw-r--r-- | www/c-icap/patches/patch-cfg__param.c | 195 | ||||
-rw-r--r-- | www/c-icap/patches/patch-configure | 8 | ||||
-rw-r--r-- | www/c-icap/patches/patch-include_cfg__param.h | 15 | ||||
-rw-r--r-- | www/c-icap/patches/patch-module.c | 150 | ||||
-rw-r--r-- | www/c-icap/patches/patch-mpmt__server.c | 182 | ||||
-rw-r--r-- | www/c-icap/patches/patch-service.c | 33 | ||||
-rw-r--r-- | www/c-icap/patches/patch-winnt__server.c | 99 |
12 files changed, 28 insertions, 739 deletions
diff --git a/www/c-icap/Makefile b/www/c-icap/Makefile index 756293e21de..bc581c508a3 100644 --- a/www/c-icap/Makefile +++ b/www/c-icap/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.18 2016/06/08 19:24:53 wiz Exp $ +# $NetBSD: Makefile,v 1.19 2017/02/06 14:14:48 adam Exp $ -DISTNAME= c_icap-0.3.5 +DISTNAME= c_icap-0.4.4 PKGNAME= ${DISTNAME:S/_/-/} -PKGREVISION= 2 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=c-icap/} diff --git a/www/c-icap/PLIST b/www/c-icap/PLIST index 6bf0e1a7c37..966a5ba9277 100644 --- a/www/c-icap/PLIST +++ b/www/c-icap/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 2015/06/12 23:39:11 taca Exp $ +@comment $NetBSD: PLIST,v 1.4 2017/02/06 14:14:48 adam Exp $ bin/c-icap bin/c-icap-client bin/c-icap-config @@ -13,6 +13,7 @@ include/c_icap/c-icap-conf.h include/c_icap/c-icap.h include/c_icap/cache.h include/c_icap/cfg_param.h +include/c_icap/ci_regex.h include/c_icap/ci_threads.h include/c_icap/commands.h include/c_icap/debug.h @@ -42,6 +43,7 @@ ${PLIST.bdb}lib/c_icap/bdb_tables.la lib/c_icap/dnsbl_tables.la ${PLIST.ldap}lib/c_icap/ldap_module.la ${PLIST.perl}lib/c_icap/perl_handler.la +lib/c_icap/shared_cache.la lib/c_icap/srv_echo.la lib/c_icap/srv_ex206.la lib/c_icap/sys_logger.la diff --git a/www/c-icap/distinfo b/www/c-icap/distinfo index 9ef8195ca43..c59ff01d5c2 100644 --- a/www/c-icap/distinfo +++ b/www/c-icap/distinfo @@ -1,15 +1,9 @@ -$NetBSD: distinfo,v 1.8 2015/11/04 02:46:50 agc Exp $ +$NetBSD: distinfo,v 1.9 2017/02/06 14:14:48 adam Exp $ -SHA1 (c_icap-0.3.5.tar.gz) = 189db804146a5654105e8bf6791b5f6eebd5f068 -RMD160 (c_icap-0.3.5.tar.gz) = 32f4d7dbe2a6170b3858c6d05c3f3e388c1037bd -SHA512 (c_icap-0.3.5.tar.gz) = 4de5608027930551a78d3507ae2263eb2688dc41e257c87578f39c435ed736545b9e77adcca6ac077b173472aea06675950c765ec4a4124eba296f9f9a2c8b35 -Size (c_icap-0.3.5.tar.gz) = 614388 bytes -SHA1 (patch-Makefile.in) = 251eb502dd1a40ef45ff46f8814f12b098c01528 -SHA1 (patch-aserver.c) = cbcec895c718cb4270b1ac249b5ea0d425ed35ba -SHA1 (patch-cfg__param.c) = 91cfa22762c9bf82eecc8d29afc9f08414124c3e -SHA1 (patch-configure) = c1e533f47cc1a1e580337e8882b0222d966e6b30 -SHA1 (patch-include_cfg__param.h) = 02c094f42bb9b9395b1c9cbfb2bfb3715a8717b5 -SHA1 (patch-module.c) = 0b95917721340a1a78102b2b10033a0de0dfec31 -SHA1 (patch-mpmt__server.c) = d8ec64183acbd9e8b159fde4e92c92a79ab80da0 -SHA1 (patch-service.c) = ecb623c1bce5acce186a153abbb3129e8b15ccab -SHA1 (patch-winnt__server.c) = c14bf29bf5d04bf127e1b2a22a68739144c496bd +SHA1 (c_icap-0.4.4.tar.gz) = c2cf919215812a40053652f9501c1b8d3c40c684 +RMD160 (c_icap-0.4.4.tar.gz) = a69c5832951db9c424a3ea748d4512ec1ce313a2 +SHA512 (c_icap-0.4.4.tar.gz) = b98ddbe6da24d3a21d98e1acb72b34f65e115cf98c34a01a1ce5591975c8a8b9f59d04dd168f5111f3694ab9ff1ce303dd70e0ae5c67e90f01744146feb47f17 +Size (c_icap-0.4.4.tar.gz) = 636947 bytes +SHA1 (patch-Makefile.in) = 103129c1bd438885290c3712c53b8e9d3cc3b1ab +SHA1 (patch-cfg__param.c) = 005d22a2d0cc0f64b38a14477b1d21c28e361018 +SHA1 (patch-configure) = d7ed5a07c97b123a42af91df3efcd99c39a74a6b diff --git a/www/c-icap/patches/patch-Makefile.in b/www/c-icap/patches/patch-Makefile.in index 0da89d90345..4017f5b5b9c 100644 --- a/www/c-icap/patches/patch-Makefile.in +++ b/www/c-icap/patches/patch-Makefile.in @@ -1,13 +1,13 @@ -$NetBSD: patch-Makefile.in,v 1.3 2015/06/12 23:39:11 taca Exp $ +$NetBSD: patch-Makefile.in,v 1.4 2017/02/06 14:14:48 adam Exp $ Handle configuration files. ---- Makefile.in.orig 2014-10-28 10:45:45.000000000 +0000 +--- Makefile.in.orig 2016-09-21 12:09:38.000000000 +0000 +++ Makefile.in -@@ -1718,11 +1718,9 @@ doc: +@@ -1748,11 +1748,9 @@ doc: $(DOXYGEN) c-icap.dox - install-data-local: + install-data-local: c-icap.conf - $(mkinstalldirs) $(DESTDIR)$(CONFIGDIR); - $(INSTALL) c-icap.conf $(DESTDIR)$(CONFIGDIR)/c-icap.conf.default - $(INSTALL) c-icap.magic $(DESTDIR)$(CONFIGDIR)/c-icap.magic.default diff --git a/www/c-icap/patches/patch-aserver.c b/www/c-icap/patches/patch-aserver.c deleted file mode 100644 index e65fb9955f7..00000000000 --- a/www/c-icap/patches/patch-aserver.c +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-aserver.c,v 1.2 2015/06/12 23:39:11 taca Exp $ - -Avoid CONF name colision. - ---- aserver.c.orig 2013-12-27 15:10:53.000000000 +0000 -+++ aserver.c -@@ -125,9 +125,9 @@ int main(int argc, char **argv) - ci_txt_template_set_dir(DATADIR"templates"); - commands_init(); - -- if (!(CONF.MAGIC_DB = ci_magic_db_load(CONF.magics_file))) { -+ if (!(ci_CONF.MAGIC_DB = ci_magic_db_load(ci_CONF.magics_file))) { - ci_debug_printf(1, "Can not load magic file %s!!!\n", -- CONF.magics_file); -+ ci_CONF.magics_file); - } - init_conf_tables(); - request_stats_init(); -@@ -143,22 +143,22 @@ int main(int argc, char **argv) - } - - #if ! defined(_WIN32) -- if (is_icap_running(CONF.PIDFILE)) { -+ if (is_icap_running(ci_CONF.PIDFILE)) { - ci_debug_printf(1, "c-icap server already running!\n"); - exit(-1); - } - if (DAEMON_MODE) - run_as_daemon(); -- if (!set_running_permissions(CONF.RUN_USER, CONF.RUN_GROUP)) -+ if (!set_running_permissions(ci_CONF.RUN_USER, ci_CONF.RUN_GROUP)) - exit(-1); -- store_pid(CONF.PIDFILE); -+ store_pid(ci_CONF.PIDFILE); - #endif - -- if (!init_server(CONF.ADDRESS, CONF.PORT, &(CONF.PROTOCOL_FAMILY))) -+ if (!init_server(ci_CONF.ADDRESS, ci_CONF.PORT, &(ci_CONF.PROTOCOL_FAMILY))) - return -1; - post_init_modules(); - post_init_services(); - start_server(); -- clear_pid(CONF.PIDFILE); -+ clear_pid(ci_CONF.PIDFILE); - return 0; - } diff --git a/www/c-icap/patches/patch-cfg__param.c b/www/c-icap/patches/patch-cfg__param.c index 3ae2569872b..88e132b910d 100644 --- a/www/c-icap/patches/patch-cfg__param.c +++ b/www/c-icap/patches/patch-cfg__param.c @@ -1,124 +1,10 @@ -$NetBSD: patch-cfg__param.c,v 1.2 2015/06/12 23:39:11 taca Exp $ +$NetBSD: patch-cfg__param.c,v 1.3 2017/02/06 14:14:48 adam Exp $ -Avoid CONF name colision. +Fix compilation. ---- cfg_param.c.orig 2014-10-23 09:20:46.000000000 +0000 +--- cfg_param.c.orig 2015-08-27 09:01:51.000000000 +0000 +++ cfg_param.c -@@ -40,7 +40,7 @@ - int ARGC; - char **ARGV; - --struct ci_server_conf CONF = { -+struct ci_server_conf ci_CONF = { - NULL, /* LISTEN ADDRESS */ 1344, /*PORT*/ AF_INET, /*SOCK_FAMILY */ - #ifdef _WIN32 - "c:\\TEMP", /*TMPDIR*/ "c:\\TEMP\\c-icap.pid", /*PIDFILE*/ "\\\\.\\pipe\\c-icap", /*COMMANDS_SOCKET; */ -@@ -134,34 +134,34 @@ struct sub_table { - }; - - static struct ci_conf_entry conf_variables[] = { -- {"ListenAddress", &CONF.ADDRESS, intl_cfg_set_str, NULL}, -- {"PidFile", &CONF.PIDFILE, intl_cfg_set_str, NULL}, -- {"CommandsSocket", &CONF.COMMANDS_SOCKET, intl_cfg_set_str, NULL}, -+ {"ListenAddress", &ci_CONF.ADDRESS, intl_cfg_set_str, NULL}, -+ {"PidFile", &ci_CONF.PIDFILE, intl_cfg_set_str, NULL}, -+ {"CommandsSocket", &ci_CONF.COMMANDS_SOCKET, intl_cfg_set_str, NULL}, - {"Timeout", (void *) (&TIMEOUT), intl_cfg_set_int, NULL}, - {"KeepAlive", NULL, NULL, NULL}, - {"MaxKeepAliveRequests", &MAX_KEEPALIVE_REQUESTS, intl_cfg_set_int, NULL}, - {"KeepAliveTimeout", &KEEPALIVE_TIMEOUT, intl_cfg_set_int, NULL}, -- {"StartServers", &CONF.START_SERVERS, intl_cfg_set_int, NULL}, -- {"MaxServers", &CONF.MAX_SERVERS, intl_cfg_set_int, NULL}, -- {"MinSpareThreads", &CONF.MIN_SPARE_THREADS, intl_cfg_set_int, NULL}, -- {"MaxSpareThreads", &CONF.MAX_SPARE_THREADS, intl_cfg_set_int, NULL}, -- {"ThreadsPerChild", &CONF.THREADS_PER_CHILD, intl_cfg_set_int, NULL}, -+ {"StartServers", &ci_CONF.START_SERVERS, intl_cfg_set_int, NULL}, -+ {"MaxServers", &ci_CONF.MAX_SERVERS, intl_cfg_set_int, NULL}, -+ {"MinSpareThreads", &ci_CONF.MIN_SPARE_THREADS, intl_cfg_set_int, NULL}, -+ {"MaxSpareThreads", &ci_CONF.MAX_SPARE_THREADS, intl_cfg_set_int, NULL}, -+ {"ThreadsPerChild", &ci_CONF.THREADS_PER_CHILD, intl_cfg_set_int, NULL}, - {"MaxRequestsPerChild", &MAX_REQUESTS_PER_CHILD, intl_cfg_set_int, NULL}, - {"MaxRequestsReallocateMem", &MAX_REQUESTS_BEFORE_REALLOCATE_MEM, - intl_cfg_set_int, NULL}, -- {"Port", &CONF.PORT, intl_cfg_set_int, NULL}, -- {"User", &CONF.RUN_USER, intl_cfg_set_str, NULL}, -- {"Group", &CONF.RUN_GROUP, intl_cfg_set_str, NULL}, -- {"ServerAdmin", &CONF.SERVER_ADMIN, intl_cfg_set_str, NULL}, -- {"ServerName", &CONF.SERVER_NAME, intl_cfg_set_str, NULL}, -+ {"Port", &ci_CONF.PORT, intl_cfg_set_int, NULL}, -+ {"User", &ci_CONF.RUN_USER, intl_cfg_set_str, NULL}, -+ {"Group", &ci_CONF.RUN_GROUP, intl_cfg_set_str, NULL}, -+ {"ServerAdmin", &ci_CONF.SERVER_ADMIN, intl_cfg_set_str, NULL}, -+ {"ServerName", &ci_CONF.SERVER_NAME, intl_cfg_set_str, NULL}, - {"LoadMagicFile", NULL, cfg_load_magicfile, NULL}, - {"Logger", &default_logger, cfg_set_logger, NULL}, - {"ServerLog", &SERVER_LOG_FILE, intl_cfg_set_str, NULL}, - {"AccessLog", NULL, cfg_set_accesslog, NULL}, - {"LogFormat", NULL, cfg_set_logformat, NULL}, - {"DebugLevel", NULL, cfg_set_debug_level, NULL}, /*Set library's debug level */ -- {"ServicesDir", &CONF.SERVICES_DIR, intl_cfg_set_str, NULL}, -- {"ModulesDir", &CONF.MODULES_DIR, intl_cfg_set_str, NULL}, -+ {"ServicesDir", &ci_CONF.SERVICES_DIR, intl_cfg_set_str, NULL}, -+ {"ModulesDir", &ci_CONF.MODULES_DIR, intl_cfg_set_str, NULL}, - {"Service", NULL, cfg_load_service, NULL}, - {"ServiceAlias", NULL, cfg_service_alias, NULL}, - {"Module", NULL, cfg_load_module, NULL}, -@@ -451,7 +451,7 @@ int cfg_load_magicfile(const char *direc - } - - db_file = argv[0]; -- if (strcmp(CONF.magics_file, db_file) == 0) { -+ if (strcmp(ci_CONF.magics_file, db_file) == 0) { - ci_debug_printf(2, "The db file %s is the same as default. Ignoring...\n", db_file); - return 1; - } -@@ -461,8 +461,8 @@ int cfg_load_magicfile(const char *direc - ci_debug_printf(1, "Can not load magic file %s!!!\n", db_file); - return 0; - } -- if (!CONF.MAGIC_DB) -- CONF.MAGIC_DB = ndb; -+ if (!ci_CONF.MAGIC_DB) -+ ci_CONF.MAGIC_DB = ndb; - - return 1; - } -@@ -517,24 +517,24 @@ int cfg_set_tmp_dir(const char *directiv - return 0; - } - -- cfg_default_value_store(&CONF.TMPDIR, &CONF.TMPDIR, sizeof(char *)); -+ cfg_default_value_store(&ci_CONF.TMPDIR, &ci_CONF.TMPDIR, sizeof(char *)); - len = strlen(argv[0]); - -- CONF.TMPDIR = ci_cfg_alloc_mem((len + 2) * sizeof(char)); -- strcpy(CONF.TMPDIR, argv[0]); -+ ci_CONF.TMPDIR = ci_cfg_alloc_mem((len + 2) * sizeof(char)); -+ strcpy(ci_CONF.TMPDIR, argv[0]); - #ifdef _WIN32 -- if (CONF.TMPDIR[len] != '\\') { -- CONF.TMPDIR[len] = '\\'; -- CONF.TMPDIR[len + 1] = '\0'; -+ if (ci_CONF.TMPDIR[len] != '\\') { -+ ci_CONF.TMPDIR[len] = '\\'; -+ ci_CONF.TMPDIR[len + 1] = '\0'; - } - #else -- if (CONF.TMPDIR[len] != '/') { -- CONF.TMPDIR[len] = '/'; -- CONF.TMPDIR[len + 1] = '\0'; -+ if (ci_CONF.TMPDIR[len] != '/') { -+ ci_CONF.TMPDIR[len] = '/'; -+ ci_CONF.TMPDIR[len + 1] = '\0'; - } - #endif - /*Check if tmpdir exists. If no try to build it , report an error and uses the default... */ -- CI_TMPDIR = CONF.TMPDIR; /*Sets the library's temporary dir to .... */ -+ CI_TMPDIR = ci_CONF.TMPDIR; /*Sets the library's temporary dir to .... */ - ci_debug_printf(2, "Setting parameter :%s=%s\n", directive, argv[0]); - return 1; - } -@@ -675,14 +675,12 @@ int fread_line(FILE * f_conf, char *line +@@ -699,14 +699,12 @@ int fread_line(FILE * f_conf, char *line struct ci_conf_entry *find_action(char *str, char **arg) { char *end, *table, *s; @@ -135,7 +21,7 @@ Avoid CONF name colision. end++; *arg = end; if ((s = strchr(str, '.')) != NULL) { -@@ -720,7 +718,7 @@ char **split_args(char *args) +@@ -744,7 +742,7 @@ char **split_args(char *args) else { /*Support arguments in the form arg{a, b...}*/ brkt = 0; @@ -144,7 +30,7 @@ Avoid CONF name colision. if (*end == '{') brkt = 1; else if (brkt && *end == '}') brkt = 0; end++; -@@ -739,7 +737,7 @@ char **split_args(char *args) +@@ -763,7 +761,7 @@ char **split_args(char *args) if (*end == '"') end++; @@ -153,7 +39,7 @@ Avoid CONF name colision. end++; } while (*end != '\0'); -@@ -771,7 +769,7 @@ int process_line(char *orig_line) +@@ -795,7 +793,7 @@ int process_line(char *orig_line) line[LINESIZE-1] = '\0'; str = line; @@ -162,70 +48,3 @@ Avoid CONF name colision. str++; if (*str == '\0' || *str == '#') /*Empty line or comment */ return 1; -@@ -842,7 +840,7 @@ int parse_file(const char *conf_file) - /* #endif */ - - static struct ci_options_entry options[] = { -- {opt_pre "f", "filename", &CONF.cfg_file, ci_cfg_set_str, -+ {opt_pre "f", "filename", &ci_CONF.cfg_file, ci_cfg_set_str, - "Specify the configuration file"}, - {opt_pre "N", NULL, &DAEMON_MODE, ci_cfg_disable, "Do not run as daemon"}, - {opt_pre "d", "level", NULL, cfg_set_debug_level_cmd, -@@ -864,7 +862,7 @@ int config(int argc, char **argv) - ci_args_usage(argv[0], options); - exit(-1); - } -- if (!parse_file(CONF.cfg_file)) { -+ if (!parse_file(ci_CONF.cfg_file)) { - ci_debug_printf(1, "Error opening/parsing config file\n"); - exit(0); - } -@@ -883,7 +881,7 @@ int reconfig() - "Error in command line options, while reconfiguring!\n"); - return 0; - } -- if (!parse_file(CONF.cfg_file)) { -+ if (!parse_file(ci_CONF.cfg_file)) { - ci_debug_printf(1, - "Error opening/parsing config file, while reconfiguring!\n"); - return 0; -@@ -923,7 +921,7 @@ void system_shutdown() - Release other subsystems - */ - ci_magic_db_free(); -- CONF.MAGIC_DB = NULL; -+ ci_CONF.MAGIC_DB = NULL; - ci_txt_template_close(); - } - -@@ -939,9 +937,9 @@ int system_reconfigure() - - ci_debug_printf(1, "All resources released. Going to reload!\n"); - ci_txt_template_init(); -- if (!(CONF.MAGIC_DB = ci_magic_db_load(CONF.magics_file))) { -+ if (!(ci_CONF.MAGIC_DB = ci_magic_db_load(ci_CONF.magics_file))) { - ci_debug_printf(1, "Can not load magic file %s!!!\n", -- CONF.magics_file); -+ ci_CONF.magics_file); - } - init_modules(); - init_services(); -@@ -950,15 +948,15 @@ int system_reconfigure() - - Freeing all memory and resources used by configuration parameters (is it possible???) - - reopen and read config file. Now the monitor process has now the new config parameters. - */ -- old_port = CONF.PORT; -+ old_port = ci_CONF.PORT; - if (!reconfig()) - return 0; - - /* - - reinit listen socket if needed - */ -- if (old_port != CONF.PORT) { -- init_server(CONF.ADDRESS, CONF.PORT, &(CONF.PROTOCOL_FAMILY)); -+ if (old_port != ci_CONF.PORT) { -+ init_server(ci_CONF.ADDRESS, ci_CONF.PORT, &(ci_CONF.PROTOCOL_FAMILY)); - } - - log_open(); diff --git a/www/c-icap/patches/patch-configure b/www/c-icap/patches/patch-configure index 79130bd0be8..311a8dbb1e5 100644 --- a/www/c-icap/patches/patch-configure +++ b/www/c-icap/patches/patch-configure @@ -1,10 +1,10 @@ -$NetBSD: patch-configure,v 1.5 2015/06/12 23:39:11 taca Exp $ +$NetBSD: patch-configure,v 1.6 2017/02/06 14:14:48 adam Exp $ Detect Berkeley DB. ---- configure.orig 2014-10-28 10:45:44.000000000 +0000 +--- configure.orig 2016-09-21 12:09:36.000000000 +0000 +++ configure -@@ -13060,12 +13060,11 @@ rm -f core conftest.err conftest.$ac_obj +@@ -13210,12 +13210,11 @@ rm -f core conftest.err conftest.$ac_obj OLDCFLAGS=$CFLAGS OLDLDFLAGS=$LDFLAGS OLDLIBS=$LIBS @@ -19,7 +19,7 @@ Detect Berkeley DB. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13079,7 +13078,7 @@ rm -f core conftest.err conftest.$ac_obj +@@ -13229,7 +13228,7 @@ rm -f core conftest.err conftest.$ac_obj _ACEOF if ac_fn_c_try_link "$LINENO"; then : diff --git a/www/c-icap/patches/patch-include_cfg__param.h b/www/c-icap/patches/patch-include_cfg__param.h deleted file mode 100644 index deb387fcbed..00000000000 --- a/www/c-icap/patches/patch-include_cfg__param.h +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-include_cfg__param.h,v 1.2 2015/06/12 23:39:11 taca Exp $ - -Avoid CONF name colision. - ---- include/cfg_param.h.orig 2013-10-25 14:59:54.000000000 +0000 -+++ include/cfg_param.h -@@ -126,7 +126,7 @@ struct cfg_default_value{ - #define ALIAS_TABLE 2 - - #ifndef CI_BUILD_LIB --extern struct ci_server_conf CONF; -+extern struct ci_server_conf ci_CONF; - - struct cfg_default_value * cfg_default_value_store(void *param, void *value,int size); - struct cfg_default_value * cfg_default_value_replace(void *param, void *value); diff --git a/www/c-icap/patches/patch-module.c b/www/c-icap/patches/patch-module.c deleted file mode 100644 index 0944799cf8a..00000000000 --- a/www/c-icap/patches/patch-module.c +++ /dev/null @@ -1,150 +0,0 @@ -$NetBSD: patch-module.c,v 1.2 2015/06/12 23:39:11 taca Exp $ - -Avoid CONF name colision. - ---- module.c.orig 2013-10-25 14:59:57.000000000 +0000 -+++ module.c -@@ -71,7 +71,7 @@ void *load_module(const char *module_fil - void *module = NULL; - CI_DLIB_HANDLE module_handle; - -- module_handle = ci_module_load(module_file, CONF.MODULES_DIR); -+ module_handle = ci_module_load(module_file, ci_CONF.MODULES_DIR); - if (!module_handle) - return NULL; - module = ci_module_sym(module_handle, "module"); -@@ -146,7 +146,7 @@ static int init_module(void *module, enu - if (((service_handler_module_t *) module)->init_service_handler) - ret = - ((service_handler_module_t *) module)-> -- init_service_handler(&CONF); -+ init_service_handler(&ci_CONF); - if (((service_handler_module_t *) module)->conf_table) - register_conf_table(((service_handler_module_t *) module)->name, - ((service_handler_module_t *) module)-> -@@ -154,7 +154,7 @@ static int init_module(void *module, enu - break; - case LOGGER: - if (((logger_module_t *) module)->init_logger) -- ret = ((logger_module_t *) module)->init_logger(&CONF); -+ ret = ((logger_module_t *) module)->init_logger(&ci_CONF); - if (((logger_module_t *) module)->conf_table) - register_conf_table(((logger_module_t *) module)->name, - ((logger_module_t *) module)->conf_table, -@@ -165,7 +165,7 @@ static int init_module(void *module, enu - if (((access_control_module_t *) module)->init_access_controller) - ret = - ((access_control_module_t *) module)-> -- init_access_controller(&CONF); -+ init_access_controller(&ci_CONF); - if (((access_control_module_t *) module)->conf_table) - register_conf_table(((access_control_module_t *) module)->name, - ((access_control_module_t *) module)-> -@@ -173,7 +173,7 @@ static int init_module(void *module, enu - break; - case AUTH_METHOD: - if (((http_auth_method_t *) module)->init_auth_method) -- ret = ((http_auth_method_t *) module)->init_auth_method(&CONF); -+ ret = ((http_auth_method_t *) module)->init_auth_method(&ci_CONF); - if (((http_auth_method_t *) module)->conf_table) - register_conf_table(((http_auth_method_t *) module)->name, - ((http_auth_method_t *) module)->conf_table, -@@ -184,7 +184,7 @@ static int init_module(void *module, enu - if (((authenticator_module_t *) module)->init_authenticator) - ret = - ((authenticator_module_t *) module)-> -- init_authenticator(&CONF); -+ init_authenticator(&ci_CONF); - if (((authenticator_module_t *) module)->conf_table) - register_conf_table(((authenticator_module_t *) module)->name, - ((authenticator_module_t *) module)-> -@@ -192,7 +192,7 @@ static int init_module(void *module, enu - break; - case COMMON: - if (((common_module_t *) module)->init_module) -- ret = ((common_module_t *) module)->init_module(&CONF); -+ ret = ((common_module_t *) module)->init_module(&ci_CONF); - if (((common_module_t *) module)->conf_table) - register_conf_table(((common_module_t *) module)->name, - ((common_module_t *) module)->conf_table, -@@ -607,7 +607,7 @@ int post_init_modules() - if (((common_module_t *) common_modules.modules[i])-> - post_init_module != NULL) - ((common_module_t *) common_modules.modules[i])-> -- post_init_module(&CONF); -+ post_init_module(&ci_CONF); - } - - /* service_handlers */ -@@ -615,7 +615,7 @@ int post_init_modules() - if (((service_handler_module_t *) service_handlers.modules[i])-> - post_init_service_handler != NULL) - ((service_handler_module_t *) service_handlers.modules[i])-> -- post_init_service_handler(&CONF); -+ post_init_service_handler(&ci_CONF); - } - - /* loggers? loggers do not have post init handlers .... */ -@@ -626,7 +626,7 @@ int post_init_modules() - if (((access_control_module_t *) access_controllers.modules[i])-> - post_init_access_controller != NULL) - ((access_control_module_t *) access_controllers.modules[i])-> -- post_init_access_controller(&CONF); -+ post_init_access_controller(&ci_CONF); - } - - -@@ -636,7 +636,7 @@ int post_init_modules() - if (((http_auth_method_t *) auth_methods.modules[i])-> - post_init_auth_method != NULL) - ((http_auth_method_t *) auth_methods.modules[i])-> -- post_init_auth_method(&CONF); -+ post_init_auth_method(&ci_CONF); - } - - /* authenticators */ -@@ -644,7 +644,7 @@ int post_init_modules() - if (((authenticator_module_t *) authenticators.modules[i])-> - post_init_authenticator != NULL) - ((authenticator_module_t *) authenticators.modules[i])-> -- post_init_authenticator(&CONF); -+ post_init_authenticator(&ci_CONF); - } - - return 1; -@@ -684,7 +684,7 @@ int release_modules() - if (((access_control_module_t *) access_controllers.modules[i])-> - release_access_controller != NULL) - ((access_control_module_t *) access_controllers.modules[i])-> -- release_access_controller(&CONF); -+ release_access_controller(&ci_CONF); - } - RELEASE_MOD_LIST(access_controllers); - -@@ -693,7 +693,7 @@ int release_modules() - if (((http_auth_method_t *) auth_methods.modules[i])-> - close_auth_method != NULL) - ((http_auth_method_t *) auth_methods.modules[i])-> -- close_auth_method(&CONF); -+ close_auth_method(&ci_CONF); - } - RELEASE_MOD_LIST(auth_methods); - -@@ -702,7 +702,7 @@ int release_modules() - if (((authenticator_module_t *) authenticators.modules[i])-> - close_authenticator != NULL) - ((authenticator_module_t *) authenticators.modules[i])-> -- close_authenticator(&CONF); -+ close_authenticator(&ci_CONF); - } - RELEASE_MOD_LIST(authenticators); - -@@ -711,7 +711,7 @@ int release_modules() - if (((common_module_t *) common_modules.modules[i])-> - close_module != NULL) - ((common_module_t *) common_modules.modules[i])-> -- close_module(&CONF); -+ close_module(&ci_CONF); - } - RELEASE_MOD_LIST(common_modules); - diff --git a/www/c-icap/patches/patch-mpmt__server.c b/www/c-icap/patches/patch-mpmt__server.c deleted file mode 100644 index 744350777ca..00000000000 --- a/www/c-icap/patches/patch-mpmt__server.c +++ /dev/null @@ -1,182 +0,0 @@ -$NetBSD: patch-mpmt__server.c,v 1.2 2015/06/12 23:39:11 taca Exp $ - -Avoid CONF name colision. - ---- mpmt_server.c.orig 2014-10-23 09:20:46.000000000 +0000 -+++ mpmt_server.c -@@ -49,7 +49,7 @@ extern int MAX_KEEPALIVE_REQUESTS; - extern int MAX_SECS_TO_LINGER; - extern int MAX_REQUESTS_BEFORE_REALLOCATE_MEM; - extern int MAX_REQUESTS_PER_CHILD; --extern struct ci_server_conf CONF; -+extern struct ci_server_conf ci_CONF; - - typedef struct server_decl { - int srv_id; -@@ -232,13 +232,13 @@ static void cancel_all_threads() - ci_thread_cond_broadcast(&(con_queue->queue_cond)); - /*wait for a milisecond*/ - ci_usleep(1000); -- servers_running = CONF.THREADS_PER_CHILD; -+ servers_running = ci_CONF.THREADS_PER_CHILD; - while (servers_running && wait_for_workers >= 0) { - /*child_data->to_be_killed, may change while we are inside this loop*/ - if (child_data->to_be_killed == IMMEDIATELY) { - CHILD_HALT = 1; - } -- for (i=0; i<CONF.THREADS_PER_CHILD; i++) { -+ for (i=0; i<ci_CONF.THREADS_PER_CHILD; i++) { - if (threads_list[i] != NULL) { /* if the i thread is still alive*/ - if (!threads_list[i]->running) { /*if the i thread is not running any more*/ - ci_debug_printf(5, "Cancel server %d, thread_id %lu (%d)\n", -@@ -257,7 +257,7 @@ static void cancel_all_threads() - } - } - }/*the i thread is still alive*/ -- } /* for(i=0;i< CONF.THREADS_PER_CHILD;i++)*/ -+ } /* for(i=0;i< ci_CONF.THREADS_PER_CHILD;i++)*/ - - /*wait for 1 second for the next round*/ - ci_usleep(999999); -@@ -411,7 +411,7 @@ static int server_reconfigure() - */ - old_childs_queue = childs_queue; - childs_queue = malloc(sizeof(struct childs_queue)); -- if (!create_childs_queue(childs_queue, 2 * CONF.MAX_SERVERS)) { -+ if (!create_childs_queue(childs_queue, 2 * ci_CONF.MAX_SERVERS)) { - ci_debug_printf(1, - "Cannot init shared memory. Fatal error, exiting!\n"); - return 0; /*It is not enough. We must wait all childs to exit ..... */ -@@ -419,10 +419,10 @@ static int server_reconfigure() - /* - Start new childs to handle new requests. - */ -- if (CONF.START_SERVERS > CONF.MAX_SERVERS) -- CONF.START_SERVERS = CONF.MAX_SERVERS; -+ if (ci_CONF.START_SERVERS > ci_CONF.MAX_SERVERS) -+ ci_CONF.START_SERVERS = ci_CONF.MAX_SERVERS; - -- for (i = 0; i < CONF.START_SERVERS; i++) { -+ for (i = 0; i < ci_CONF.START_SERVERS; i++) { - start_child(LISTEN_SOCKET); - } - -@@ -851,11 +851,11 @@ void child_main(int sockfd, int pipefd) - ci_stat_attach_mem(child_data->stats, child_data->stats_size, NULL); - - threads_list = -- (server_decl_t **) malloc((CONF.THREADS_PER_CHILD + 1) * -+ (server_decl_t **) malloc((ci_CONF.THREADS_PER_CHILD + 1) * - sizeof(server_decl_t *)); -- con_queue = init_queue(CONF.THREADS_PER_CHILD); -+ con_queue = init_queue(ci_CONF.THREADS_PER_CHILD); - -- for (i = 0; i < CONF.THREADS_PER_CHILD; i++) { -+ for (i = 0; i < ci_CONF.THREADS_PER_CHILD; i++) { - if ((threads_list[i] = newthread(con_queue)) == NULL) { - exit(-1); // FATAL error..... - } -@@ -864,7 +864,7 @@ void child_main(int sockfd, int pipefd) - (void *) threads_list[i]); - threads_list[i]->srv_pthread = thread; - } -- threads_list[CONF.THREADS_PER_CHILD] = NULL; -+ threads_list[ci_CONF.THREADS_PER_CHILD] = NULL; - /*Now start the listener thread.... */ - ret = ci_thread_create(&thread, (void *(*)(void *)) listener_thread, - (void *) &sockfd); -@@ -957,7 +957,7 @@ int start_child(int fd) - MY_PROC_PID = getpid(); - attach_childs_queue(childs_queue); - child_data = -- register_child(childs_queue, getpid(), CONF.THREADS_PER_CHILD, pfd[1]); -+ register_child(childs_queue, getpid(), ci_CONF.THREADS_PER_CHILD, pfd[1]); - close(pfd[1]); - child_main(fd, pfd[0]); - exit(0); -@@ -1026,11 +1026,11 @@ int start_server() - char command_buffer[COMMANDS_BUFFER_SIZE]; - int user_informed = 0; - -- ctl_socket = ci_named_pipe_create(CONF.COMMANDS_SOCKET); -+ ctl_socket = ci_named_pipe_create(ci_CONF.COMMANDS_SOCKET); - if (ctl_socket < 0) { - ci_debug_printf(1, - "Error opening control socket %s. Fatal error, exiting!\n", -- CONF.COMMANDS_SOCKET); -+ ci_CONF.COMMANDS_SOCKET); - exit(0); - } - -@@ -1040,7 +1040,7 @@ int start_server() - exit(0); - } - childs_queue = malloc(sizeof(struct childs_queue)); -- if (!create_childs_queue(childs_queue, 2 * CONF.MAX_SERVERS)) { -+ if (!create_childs_queue(childs_queue, 2 * ci_CONF.MAX_SERVERS)) { - ci_proc_mutex_destroy(&accept_mutex); - ci_debug_printf(1, - "Can't init shared memory. Fatal error, exiting!\n"); -@@ -1050,10 +1050,10 @@ int start_server() - init_commands(); - pid = 1; - #ifdef MULTICHILD -- if (CONF.START_SERVERS > CONF.MAX_SERVERS) -- CONF.START_SERVERS = CONF.MAX_SERVERS; -+ if (ci_CONF.START_SERVERS > ci_CONF.MAX_SERVERS) -+ ci_CONF.START_SERVERS = ci_CONF.MAX_SERVERS; - -- for (i = 0; i < CONF.START_SERVERS; i++) { -+ for (i = 0; i < ci_CONF.START_SERVERS; i++) { - if (pid) - pid = start_child(LISTEN_SOCKET); - } -@@ -1068,7 +1068,7 @@ int start_server() - } - if (ret < 0) { /*Eof received on pipe. Going to reopen ... */ - ci_named_pipe_close(ctl_socket); -- ctl_socket = ci_named_pipe_open(CONF.COMMANDS_SOCKET); -+ ctl_socket = ci_named_pipe_open(ci_CONF.COMMANDS_SOCKET); - if (ctl_socket < 0) { - ci_debug_printf(1, - "Error opening control socket. We are unstable and going down!"); -@@ -1100,16 +1100,16 @@ int start_server() - kill(childs_queue->childs[child_indx].pid, SIGTERM); - - } -- else if ((freeservers <= CONF.MIN_SPARE_THREADS && childs < CONF.MAX_SERVERS) -- || childs < CONF.START_SERVERS) { -+ else if ((freeservers <= ci_CONF.MIN_SPARE_THREADS && childs < ci_CONF.MAX_SERVERS) -+ || childs < ci_CONF.START_SERVERS) { - ci_debug_printf(8, - "Free Servers: %d, children: %d. Going to start a child .....\n", - freeservers, childs); - pid = start_child(LISTEN_SOCKET); - } -- else if (freeservers >= CONF.MAX_SPARE_THREADS && -- childs > CONF.START_SERVERS && -- (freeservers - CONF.THREADS_PER_CHILD) > CONF.MIN_SPARE_THREADS) { -+ else if (freeservers >= ci_CONF.MAX_SPARE_THREADS && -+ childs > ci_CONF.START_SERVERS && -+ (freeservers - ci_CONF.THREADS_PER_CHILD) > ci_CONF.MIN_SPARE_THREADS) { - - if ((child_indx = find_an_idle_child(childs_queue)) >= 0) { - childs_queue->childs[child_indx].father_said = -@@ -1124,7 +1124,7 @@ int start_server() - user_informed = 0; - } - } -- else if (childs == CONF.MAX_SERVERS && freeservers < CONF.MIN_SPARE_THREADS) { -+ else if (childs == ci_CONF.MAX_SERVERS && freeservers < ci_CONF.MIN_SPARE_THREADS) { - if(! user_informed) { - ci_debug_printf(1, - "ATTENTION!!!! Not enough available servers (children %d, free servers %d, used servers %d)!!!!! " -@@ -1155,7 +1155,7 @@ int start_server() - #else - child_data = (child_shared_data_t *) malloc(sizeof(child_shared_data_t)); - child_data->pid = 0; -- child_data->freeservers = CONF.THREADS_PER_CHILD; -+ child_data->freeservers = ci_CONF.THREADS_PER_CHILD; - child_data->usedservers = 0; - child_data->requests = 0; - child_data->connections = 0; diff --git a/www/c-icap/patches/patch-service.c b/www/c-icap/patches/patch-service.c deleted file mode 100644 index 1720cf1e73c..00000000000 --- a/www/c-icap/patches/patch-service.c +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-service.c,v 1.2 2015/06/12 23:39:11 taca Exp $ - -Avoid CONF name colision. - ---- service.c.orig 2013-10-25 14:59:57.000000000 +0000 -+++ service.c -@@ -368,7 +368,7 @@ ci_service_module_t *add_service(ci_serv - xdata = &service_extra_data_list[services_num]; - init_extra_data(xdata, service->mod_name); - if (service->mod_init_service) { -- ret = service->mod_init_service(xdata, &CONF); -+ ret = service->mod_init_service(xdata, &ci_CONF); - if (ret != CI_OK) - xdata->status = CI_SERVICE_ERROR; - else -@@ -449,7 +449,7 @@ int post_init_services() - xdata = &service_extra_data_list[i]; - if ( xdata->status == CI_SERVICE_OK) { - ret = service_list[i]-> -- mod_post_init_service(xdata, &CONF); -+ mod_post_init_service(xdata, &ci_CONF); - if (ret != CI_OK) - xdata->status = CI_SERVICE_ERROR; - } -@@ -608,7 +608,7 @@ ci_service_module_t *load_c_service(cons - ci_service_module_t *service = NULL; - CI_DLIB_HANDLE service_handle; - -- service_handle = ci_module_load(service_file, CONF.SERVICES_DIR); -+ service_handle = ci_module_load(service_file, ci_CONF.SERVICES_DIR); - if (!service_handle) - return NULL; - service = ci_module_sym(service_handle, "service"); diff --git a/www/c-icap/patches/patch-winnt__server.c b/www/c-icap/patches/patch-winnt__server.c deleted file mode 100644 index e067164ce76..00000000000 --- a/www/c-icap/patches/patch-winnt__server.c +++ /dev/null @@ -1,99 +0,0 @@ -$NetBSD: patch-winnt__server.c,v 1.1 2015/06/12 23:39:11 taca Exp $ - -Avoid CONF name colision. - ---- winnt_server.c.orig 2013-12-27 15:08:30.000000000 +0000 -+++ winnt_server.c -@@ -62,7 +62,7 @@ TCHAR *C_ICAP_CMD = TEXT("c-icap.exe -c" - extern int KEEPALIVE_TIMEOUT; - extern int MAX_SECS_TO_LINGER; - extern int MAX_REQUESTS_BEFORE_REALLOCATE_MEM; --extern struct ci_server_conf CONF; -+extern struct ci_server_conf ciCONF; - ci_socket LISTEN_SOCKET; - - #define hard_close_connection(connection) ci_hard_close(connection->fd) -@@ -340,11 +340,11 @@ void child_main(ci_socket sockfd) - - - threads_list = -- (server_decl_t **) malloc((CONF.THREADS_PER_CHILD + 1) * -+ (server_decl_t **) malloc((ciCONF.THREADS_PER_CHILD + 1) * - sizeof(server_decl_t *)); -- con_queue = init_queue(CONF.THREADS_PER_CHILD); -+ con_queue = init_queue(ciCONF.THREADS_PER_CHILD); - -- for (i = 0; i < CONF.THREADS_PER_CHILD; i++) { -+ for (i = 0; i < ciCONF.THREADS_PER_CHILD; i++) { - if ((threads_list[i] = newthread(con_queue)) == NULL) { - exit(-1); // FATAL error..... - } -@@ -352,7 +352,7 @@ void child_main(ci_socket sockfd) - (void *(*)(void *)) thread_main, - (void *) threads_list[i]); - } -- threads_list[CONF.THREADS_PER_CHILD] = NULL; -+ threads_list[ciCONF.THREADS_PER_CHILD] = NULL; - ci_debug_printf(1, "Threads created ....\n"); - retcode = ci_thread_create(&worker_thread, - (void *(*)(void *)) worker_main, -@@ -614,7 +614,7 @@ int do_child() - } - ci_debug_printf(1, "Shared memory attached....\n"); - child_data = -- register_child(&childs_queue, child_handle, CONF.THREADS_PER_CHILD, -+ register_child(&childs_queue, child_handle, ciCONF.THREADS_PER_CHILD, - parent_pipe); - ci_debug_printf(1, "child registered ....\n"); - -@@ -751,14 +751,14 @@ int start_server() - ci_proc_mutex_init(&accept_mutex); - ci_thread_mutex_init(&control_process_mtx); - -- if (!create_childs_queue(&childs_queue, CONF.MAX_SERVERS)) { -+ if (!create_childs_queue(&childs_queue, ciCONF.MAX_SERVERS)) { - log_server(NULL, "Can't init shared memory.Fatal error, exiting!\n"); - ci_debug_printf(1, - "Can't init shared memory.Fatal error, exiting!\n"); - exit(0); - } - -- for (i = 0; i < CONF.START_SERVERS + 2; i++) { -+ for (i = 0; i < ciCONF.START_SERVERS + 2; i++) { - child_handle = start_child(LISTEN_SOCKET); - } - -@@ -777,12 +777,12 @@ int start_server() - "Server stats: \n\t Children:%d\n\t Free servers:%d\n\tUsed servers:%d\n\tRequests served:%d\n", - childs, freeservers, used, maxrequests); - -- if ((freeservers <= CONF.MIN_SPARE_THREADS && childs < CONF.MAX_SERVERS) -- || childs < CONF.START_SERVERS) { -+ if ((freeservers <= ciCONF.MIN_SPARE_THREADS && childs < ciCONF.MAX_SERVERS) -+ || childs < ciCONF.START_SERVERS) { - ci_debug_printf(1, "Going to start a child .....\n"); - child_handle = start_child(LISTEN_SOCKET); - } -- else if (freeservers >= CONF.MAX_SPARE_THREADS && childs > CONF.START_SERVERS) { -+ else if (freeservers >= ciCONF.MAX_SPARE_THREADS && childs > ciCONF.START_SERVERS) { - ci_thread_mutex_lock(&control_process_mtx); - if ((child_indx = find_an_idle_child(&childs_queue)) < 0) - continue; -@@ -794,7 +794,7 @@ int start_server() - } - } - /* -- for(i=0;i<CONF.START_SERVERS;i++){ -+ for(i=0;i<ciCONF.START_SERVERS;i++){ - pid=wait(&status); - ci_debug_printf(1,"The child %d died with status %d\n",pid,status); - } -@@ -804,7 +804,7 @@ int start_server() - #else - child_data = (child_shared_data_t *) malloc(sizeof(child_shared_data_t)); - child_data->pid = 0; -- child_data->freeservers = CONF.THREADS_PER_CHILD; -+ child_data->freeservers = ciCONF.THREADS_PER_CHILD; - child_data->usedservers = 0; - child_data->requests = 0; - child_data->connections = 0; |