summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authortaca <taca>2015-06-12 23:39:11 +0000
committertaca <taca>2015-06-12 23:39:11 +0000
commit8976d03b4303c1da4496bf392a115d1a59d5d749 (patch)
tree3c8050454ca7ef4ccb8b1240a04dc99d5ad3ba5d /www
parentfd6dda697e3cdf6e1dae0ba40162b6f535193e67 (diff)
downloadpkgsrc-8976d03b4303c1da4496bf392a115d1a59d5d749.tar.gz
Update c-icap to 0.3.5.
0.3.5 Changes * Bug fix: Wrong status code for REQMOD requests without preview * Bug fix: Spaces on header may result to bad request error * Bug fix: cache drops non expired items * Add the "DefaultService" configuration parameter. For use with buggy clients which are not include icap service name in urls. * Add support for ICAP requests pipelining * Add the "SupportBuggyClients" configuration parameter. If enabled c-icap tries to handle buggy ICAP clients which are not include correct delimiters between HTTP and ICAP headers. Other minor fixes 0.3.4 Changes * Berkeley databases may have problems when newer Berkeley DB library used hash_table, always uses a very small hash table resulting to slow search operations * c-icap crashes when trying to parse lookup table parameters * local cache items are never expired. Affects dnsbl and ldap lookup tables * posix interprocess locking does not work Other minor fixes 0.3.3 Changes * bug 67: "Bug in the service. Please report to the service author..." * Bug fix: ci_format_text function may exceeds the buffer Other minor fixes 0.3.2 Changes * Bug fix: Restrict permissions on c-icap.ctl * Author: Mathieu Parent sathieu@debian.org * Bug-Debian: http://bugs.debian.org/645122 * Bug fix: Correctly daemonize * Author: Mathieu Parent sathieu@debian.org * Bug-Debian: http://bugs.debian.org/645310 0.3.1 For installation instructions: * https://sourceforge.net/apps/trac/c-icap/wiki/configcicap * https://sourceforge.net/apps/trac/c-icap/wiki Changes * New interfaces added to help service developers. 0.2.6 Bugs fixes * The c-icap does not build correctly in some platforms * The c-icap-client does not display ICAP headers on 204 preview response * The xheaders are not displayed when %<ih fmt code used * Fix deadlocks in access log subsystem
Diffstat (limited to 'www')
-rw-r--r--www/c-icap/Makefile5
-rw-r--r--www/c-icap/PLIST4
-rw-r--r--www/c-icap/buildlink3.mk4
-rw-r--r--www/c-icap/distinfo28
-rw-r--r--www/c-icap/patches/patch-Makefile.in6
-rw-r--r--www/c-icap/patches/patch-aserver.c18
-rw-r--r--www/c-icap/patches/patch-cfg__param.c84
-rw-r--r--www/c-icap/patches/patch-configure33
-rw-r--r--www/c-icap/patches/patch-configure.in17
-rw-r--r--www/c-icap/patches/patch-include_c-icap-conf.h.in11
-rw-r--r--www/c-icap/patches/patch-include_cfg__param.h8
-rw-r--r--www/c-icap/patches/patch-include_util.h13
-rw-r--r--www/c-icap/patches/patch-module.c6
-rw-r--r--www/c-icap/patches/patch-mpmt__server.c158
-rw-r--r--www/c-icap/patches/patch-service.c6
-rw-r--r--www/c-icap/patches/patch-winnt__server.c99
16 files changed, 369 insertions, 131 deletions
diff --git a/www/c-icap/Makefile b/www/c-icap/Makefile
index 25ee276d49c..dc5b49a869d 100644
--- a/www/c-icap/Makefile
+++ b/www/c-icap/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.15 2015/06/12 10:51:48 wiz Exp $
+# $NetBSD: Makefile,v 1.16 2015/06/12 23:39:11 taca Exp $
-DISTNAME= c_icap-0.2.5
+DISTNAME= c_icap-0.3.5
PKGNAME= ${DISTNAME:S/_/-/}
-PKGREVISION= 5
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=c-icap/}
diff --git a/www/c-icap/PLIST b/www/c-icap/PLIST
index 94e111fd030..6bf0e1a7c37 100644
--- a/www/c-icap/PLIST
+++ b/www/c-icap/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2012/07/29 10:11:17 adam Exp $
+@comment $NetBSD: PLIST,v 1.3 2015/06/12 23:39:11 taca Exp $
bin/c-icap
bin/c-icap-client
bin/c-icap-config
@@ -22,11 +22,13 @@ include/c_icap/hash.h
include/c_icap/header.h
include/c_icap/log.h
include/c_icap/lookup_table.h
+include/c_icap/md5.h
include/c_icap/mem.h
include/c_icap/module.h
include/c_icap/net_io.h
include/c_icap/proc_mutex.h
include/c_icap/proc_threads_queues.h
+include/c_icap/registry.h
include/c_icap/request.h
include/c_icap/service.h
include/c_icap/shared_mem.h
diff --git a/www/c-icap/buildlink3.mk b/www/c-icap/buildlink3.mk
index 2139ed6bb37..79c9e2f65c6 100644
--- a/www/c-icap/buildlink3.mk
+++ b/www/c-icap/buildlink3.mk
@@ -1,11 +1,11 @@
-# $NetBSD: buildlink3.mk,v 1.1.1.1 2011/05/11 04:29:18 adam Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2015/06/12 23:39:11 taca Exp $
BUILDLINK_TREE+= c-icap
.if !defined(C_ICAP_BUILDLINK3_MK)
C_ICAP_BUILDLINK3_MK:=
-BUILDLINK_API_DEPENDS.c-icap+= c-icap>=0.1.5
+BUILDLINK_API_DEPENDS.c-icap+= c-icap>=0.3.5
BUILDLINK_PKGSRCDIR.c-icap?= ../../www/c-icap
.include "../../devel/zlib/buildlink3.mk"
diff --git a/www/c-icap/distinfo b/www/c-icap/distinfo
index f114db99afc..9f162e32780 100644
--- a/www/c-icap/distinfo
+++ b/www/c-icap/distinfo
@@ -1,16 +1,14 @@
-$NetBSD: distinfo,v 1.6 2015/06/02 20:02:45 joerg Exp $
+$NetBSD: distinfo,v 1.7 2015/06/12 23:39:11 taca Exp $
-SHA1 (c_icap-0.2.5.tar.gz) = 986f0906780c0d0ad13a40add1e3f4bf7fabf8d5
-RMD160 (c_icap-0.2.5.tar.gz) = a9515e36927dcf008d187e079f6bd535b7e8b6bd
-Size (c_icap-0.2.5.tar.gz) = 582223 bytes
-SHA1 (patch-Makefile.in) = 1e24956dee6d124c4f1e06d4bc6187ca0c2be52b
-SHA1 (patch-aserver.c) = cc6075128968acc2d40adb181d3241010e370258
-SHA1 (patch-cfg__param.c) = 572e8bf53b5d8433c07dddd69e9d03a636feb3e5
-SHA1 (patch-configure) = 007831090cdf9b2d6c269793b38f8e65f44dc765
-SHA1 (patch-configure.in) = 5a8ad3240425f7c1ff4dec8c3617e00d8665c62a
-SHA1 (patch-include_c-icap-conf.h.in) = b7b7e64f561062eeafc9eb88abf95d266cdb0782
-SHA1 (patch-include_cfg__param.h) = 63891cde4ebdcc863e51b37aeb8b98236e1083ea
-SHA1 (patch-include_util.h) = 1e041fa22a540fbf477cf6fb628458130977724a
-SHA1 (patch-module.c) = 023475ba2f04044c42eb6360aa15d84d8bcba24a
-SHA1 (patch-mpmt__server.c) = 1b3f942bf6e0b86e3133c9cc1339ae2b013af47f
-SHA1 (patch-service.c) = 3b84d07b91259d1617bd0c23215a7b3d6ba444b5
+SHA1 (c_icap-0.3.5.tar.gz) = 189db804146a5654105e8bf6791b5f6eebd5f068
+RMD160 (c_icap-0.3.5.tar.gz) = 32f4d7dbe2a6170b3858c6d05c3f3e388c1037bd
+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
diff --git a/www/c-icap/patches/patch-Makefile.in b/www/c-icap/patches/patch-Makefile.in
index d8d2e8f7165..0da89d90345 100644
--- a/www/c-icap/patches/patch-Makefile.in
+++ b/www/c-icap/patches/patch-Makefile.in
@@ -1,10 +1,10 @@
-$NetBSD: patch-Makefile.in,v 1.2 2012/07/29 10:11:17 adam Exp $
+$NetBSD: patch-Makefile.in,v 1.3 2015/06/12 23:39:11 taca Exp $
Handle configuration files.
---- Makefile.in.orig 2011-03-28 19:22:39.000000000 +0000
+--- Makefile.in.orig 2014-10-28 10:45:45.000000000 +0000
+++ Makefile.in
-@@ -1581,11 +1581,9 @@ doc:
+@@ -1718,11 +1718,9 @@ doc:
$(DOXYGEN) c-icap.dox
install-data-local:
diff --git a/www/c-icap/patches/patch-aserver.c b/www/c-icap/patches/patch-aserver.c
index 5c8fb446584..e65fb9955f7 100644
--- a/www/c-icap/patches/patch-aserver.c
+++ b/www/c-icap/patches/patch-aserver.c
@@ -1,10 +1,12 @@
-$NetBSD: patch-aserver.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
+$NetBSD: patch-aserver.c,v 1.2 2015/06/12 23:39:11 taca Exp $
---- aserver.c.orig 2015-05-28 20:06:22.000000000 +0000
+Avoid CONF name colision.
+
+--- aserver.c.orig 2013-12-27 15:10:53.000000000 +0000
+++ aserver.c
-@@ -105,9 +105,9 @@ int main(int argc, char **argv)
- ci_txt_template_init();
+@@ -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))) {
@@ -14,8 +16,8 @@ $NetBSD: patch-aserver.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
}
init_conf_tables();
request_stats_init();
-@@ -118,26 +118,26 @@ int main(int argc, char **argv)
- ci_debug_printf(2, "My hostname is:%s\n", MY_HOSTNAME);
+@@ -143,22 +143,22 @@ int main(int argc, char **argv)
+ }
#if ! defined(_WIN32)
- if (is_icap_running(CONF.PIDFILE)) {
@@ -32,10 +34,6 @@ $NetBSD: patch-aserver.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
+ store_pid(ci_CONF.PIDFILE);
#endif
- if (!log_open()) {
- ci_debug_printf(1, "Can not init loggers. Exiting.....\n");
- exit(-1);
- }
- 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;
diff --git a/www/c-icap/patches/patch-cfg__param.c b/www/c-icap/patches/patch-cfg__param.c
index 34fe75bce5d..3ae2569872b 100644
--- a/www/c-icap/patches/patch-cfg__param.c
+++ b/www/c-icap/patches/patch-cfg__param.c
@@ -1,8 +1,10 @@
-$NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
+$NetBSD: patch-cfg__param.c,v 1.2 2015/06/12 23:39:11 taca Exp $
---- cfg_param.c.orig 2015-05-28 20:06:20.000000000 +0000
+Avoid CONF name colision.
+
+--- cfg_param.c.orig 2014-10-23 09:20:46.000000000 +0000
+++ cfg_param.c
-@@ -38,7 +38,7 @@
+@@ -40,7 +40,7 @@
int ARGC;
char **ARGV;
@@ -11,7 +13,7 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
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; */
-@@ -129,9 +129,9 @@ struct sub_table {
+@@ -134,34 +134,34 @@ struct sub_table {
};
static struct ci_conf_entry conf_variables[] = {
@@ -24,7 +26,17 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
{"Timeout", (void *) (&TIMEOUT), intl_cfg_set_int, NULL},
{"KeepAlive", NULL, NULL, NULL},
{"MaxKeepAliveRequests", &MAX_KEEPALIVE_REQUESTS, intl_cfg_set_int, NULL},
-@@ -144,19 +144,19 @@ static struct ci_conf_entry conf_variabl
+ {"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},
@@ -51,7 +63,7 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
{"Service", NULL, cfg_load_service, NULL},
{"ServiceAlias", NULL, cfg_service_alias, NULL},
{"Module", NULL, cfg_load_module, NULL},
-@@ -443,7 +443,7 @@ int cfg_load_magicfile(const char *direc
+@@ -451,7 +451,7 @@ int cfg_load_magicfile(const char *direc
}
db_file = argv[0];
@@ -60,7 +72,7 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
ci_debug_printf(2, "The db file %s is the same as default. Ignoring...\n", db_file);
return 1;
}
-@@ -453,8 +453,8 @@ int cfg_load_magicfile(const char *direc
+@@ -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;
}
@@ -71,7 +83,7 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
return 1;
}
-@@ -509,24 +509,24 @@ int cfg_set_tmp_dir(const char *directiv
+@@ -517,24 +517,24 @@ int cfg_set_tmp_dir(const char *directiv
return 0;
}
@@ -106,7 +118,51 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
ci_debug_printf(2, "Setting parameter :%s=%s\n", directive, argv[0]);
return 1;
}
-@@ -814,7 +814,7 @@ int parse_file(const char *conf_file)
+@@ -675,14 +675,12 @@ int fread_line(FILE * f_conf, char *line
+ struct ci_conf_entry *find_action(char *str, char **arg)
+ {
+ char *end, *table, *s;
+- int size;
+ end = str;
+- while (*end != '\0' && !isspace(*end))
++ while (*end != '\0' && !isspace((unsigned char)*end))
+ end++;
+- size = end - str;
+ *end = '\0'; /*Mark the end of Variable...... */
+ end++; /*... and continue.... */
+- while (*end != '\0' && isspace(*end)) /*Find the start of arguments ...... */
++ while (*end != '\0' && isspace((unsigned char)*end)) /*Find the start of arguments ...... */
+ end++;
+ *arg = end;
+ if ((s = strchr(str, '.')) != NULL) {
+@@ -720,7 +718,7 @@ char **split_args(char *args)
+ else {
+ /*Support arguments in the form arg{a, b...}*/
+ brkt = 0;
+- while (*end != '\0' && (!isspace(*end) || brkt)) {
++ while (*end != '\0' && (!isspace((unsigned char)*end) || brkt)) {
+ if (*end == '{') brkt = 1;
+ else if (brkt && *end == '}') brkt = 0;
+ end++;
+@@ -739,7 +737,7 @@ char **split_args(char *args)
+
+ if (*end == '"')
+ end++;
+- while (*end != '\0' && isspace(*end))
++ while (*end != '\0' && isspace((unsigned char)*end))
+ end++;
+
+ } while (*end != '\0');
+@@ -771,7 +769,7 @@ int process_line(char *orig_line)
+ line[LINESIZE-1] = '\0';
+
+ str = line;
+- while (*str != '\0' && isspace(*str)) /*Eat the spaces in the begging */
++ while (*str != '\0' && isspace((unsigned char)*str)) /*Eat the spaces in the begging */
+ 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[] = {
@@ -115,7 +171,7 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
"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,
-@@ -836,7 +836,7 @@ int config(int argc, char **argv)
+@@ -864,7 +862,7 @@ int config(int argc, char **argv)
ci_args_usage(argv[0], options);
exit(-1);
}
@@ -124,7 +180,7 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
ci_debug_printf(1, "Error opening/parsing config file\n");
exit(0);
}
-@@ -855,7 +855,7 @@ int reconfig()
+@@ -883,7 +881,7 @@ int reconfig()
"Error in command line options, while reconfiguring!\n");
return 0;
}
@@ -133,7 +189,7 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
ci_debug_printf(1,
"Error opening/parsing config file, while reconfiguring!\n");
return 0;
-@@ -890,7 +890,7 @@ void system_shutdown()
+@@ -923,7 +921,7 @@ void system_shutdown()
Release other subsystems
*/
ci_magic_db_free();
@@ -142,7 +198,7 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
ci_txt_template_close();
}
-@@ -906,9 +906,9 @@ int system_reconfigure()
+@@ -939,9 +937,9 @@ int system_reconfigure()
ci_debug_printf(1, "All resources released. Going to reload!\n");
ci_txt_template_init();
@@ -154,7 +210,7 @@ $NetBSD: patch-cfg__param.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
}
init_modules();
init_services();
-@@ -917,15 +917,15 @@ int system_reconfigure()
+@@ -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.
*/
diff --git a/www/c-icap/patches/patch-configure b/www/c-icap/patches/patch-configure
index 78bd8d02585..79130bd0be8 100644
--- a/www/c-icap/patches/patch-configure
+++ b/www/c-icap/patches/patch-configure
@@ -1,18 +1,10 @@
-$NetBSD: patch-configure,v 1.4 2014/10/15 22:10:21 joerg Exp $
+$NetBSD: patch-configure,v 1.5 2015/06/12 23:39:11 taca Exp $
Detect Berkeley DB.
---- configure.orig 2013-01-04 08:36:02.000000000 +0000
+--- configure.orig 2014-10-28 10:45:44.000000000 +0000
+++ configure
-@@ -635,6 +635,7 @@ DEFINE_OFF_T
- DEFINE_SIZE_T
- USE_REGEX
- SYSV_IPC
-+HAVE_STRNSTR
- INTTYPES_H
- SYS_TYPES_H
- LDAP_ADD_FLAG
-@@ -12525,12 +12526,11 @@ rm -f core conftest.err conftest.$ac_obj
+@@ -13060,12 +13060,11 @@ rm -f core conftest.err conftest.$ac_obj
OLDCFLAGS=$CFLAGS
OLDLDFLAGS=$LDFLAGS
OLDLIBS=$LIBS
@@ -27,7 +19,7 @@ Detect Berkeley DB.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-@@ -12544,7 +12544,7 @@ rm -f core conftest.err conftest.$ac_obj
+@@ -13079,7 +13078,7 @@ rm -f core conftest.err conftest.$ac_obj
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -36,20 +28,3 @@ Detect Berkeley DB.
else
libdb="no"; echo "no";
-@@ -13302,6 +13302,7 @@ $as_echo "#define HAVE_INET_ATON 1" >>co
- fi
- done
-
-+HAVE_STRNSTR="0"
-
- for ac_func in strnstr
- do :
-@@ -13312,7 +13313,7 @@ if test "x$ac_cv_func_strnstr" = xyes; t
- _ACEOF
-
- $as_echo "#define HAVE_STRNSTR 1" >>confdefs.h
--
-+HAVE_STRNSTR="1"
-
- fi
- done
diff --git a/www/c-icap/patches/patch-configure.in b/www/c-icap/patches/patch-configure.in
deleted file mode 100644
index 0bc07af4462..00000000000
--- a/www/c-icap/patches/patch-configure.in
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-configure.in,v 1.1 2014/10/15 22:10:21 joerg Exp $
-
---- configure.in.orig 2014-10-15 13:34:17.000000000 +0000
-+++ configure.in
-@@ -526,9 +526,12 @@ AC_CHECK_FUNCS(inet_aton,
- AC_DEFINE(HAVE_INET_ATON,1,[Define HAVE_INET_ATON if inet_aton exists])
- )
-
-+HAVE_STRNSTR="0"
- AC_CHECK_FUNCS(strnstr,
- AC_DEFINE(HAVE_STRNSTR,1,[Define HAVE_STRNSTR if strnstr exists])
-+HAVE_STRNSTR="1"
- )
-+AC_SUBST(HAVE_STRNSTR)
-
- AC_CHECK_FUNCS(strncasestr,
- AC_DEFINE(HAVE_STRNCASESTR,1,[Define HAVE_STRNCASESTR if strncasestr exists])
diff --git a/www/c-icap/patches/patch-include_c-icap-conf.h.in b/www/c-icap/patches/patch-include_c-icap-conf.h.in
deleted file mode 100644
index 30c11473b66..00000000000
--- a/www/c-icap/patches/patch-include_c-icap-conf.h.in
+++ /dev/null
@@ -1,11 +0,0 @@
-$NetBSD: patch-include_c-icap-conf.h.in,v 1.1 2014/10/15 22:10:21 joerg Exp $
-
---- include/c-icap-conf.h.in.orig 2012-10-09 11:35:38.000000000 +0000
-+++ include/c-icap-conf.h.in
-@@ -106,4 +106,6 @@ typedef unsigned long long uint64_t;
- typedef long long int64_t;
- #endif
-
-+#define CI_HAVE_STRNSTR @HAVE_STRNSTR@
-+
- #endif
diff --git a/www/c-icap/patches/patch-include_cfg__param.h b/www/c-icap/patches/patch-include_cfg__param.h
index 0d76184d141..deb387fcbed 100644
--- a/www/c-icap/patches/patch-include_cfg__param.h
+++ b/www/c-icap/patches/patch-include_cfg__param.h
@@ -1,8 +1,10 @@
-$NetBSD: patch-include_cfg__param.h,v 1.1 2015/06/02 20:02:45 joerg Exp $
+$NetBSD: patch-include_cfg__param.h,v 1.2 2015/06/12 23:39:11 taca Exp $
---- include/cfg_param.h.orig 2015-05-28 20:05:29.000000000 +0000
+Avoid CONF name colision.
+
+--- include/cfg_param.h.orig 2013-10-25 14:59:54.000000000 +0000
+++ include/cfg_param.h
-@@ -121,7 +121,7 @@ struct cfg_default_value{
+@@ -126,7 +126,7 @@ struct cfg_default_value{
#define ALIAS_TABLE 2
#ifndef CI_BUILD_LIB
diff --git a/www/c-icap/patches/patch-include_util.h b/www/c-icap/patches/patch-include_util.h
deleted file mode 100644
index 876c029cfa5..00000000000
--- a/www/c-icap/patches/patch-include_util.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-include_util.h,v 1.2 2014/10/15 22:10:21 joerg Exp $
-
---- include/util.h.orig 2014-10-15 13:40:56.000000000 +0000
-+++ include/util.h
-@@ -41,7 +41,7 @@ CI_DECLARE_FUNC(struct tm*) localtime_r(
- CI_DECLARE_FUNC(struct tm*) gmtime_r(const time_t *t, struct tm *tm);
- #endif
-
--#ifndef HAVE_STRNSTR
-+#if !CI_HAVE_STRNSTR
- CI_DECLARE_FUNC(const char *) strnstr(const char *s, const char *find, size_t slen);
- #endif
-
diff --git a/www/c-icap/patches/patch-module.c b/www/c-icap/patches/patch-module.c
index 02c77a7e384..0944799cf8a 100644
--- a/www/c-icap/patches/patch-module.c
+++ b/www/c-icap/patches/patch-module.c
@@ -1,6 +1,8 @@
-$NetBSD: patch-module.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
+$NetBSD: patch-module.c,v 1.2 2015/06/12 23:39:11 taca Exp $
---- module.c.orig 2015-05-28 20:06:17.000000000 +0000
+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;
diff --git a/www/c-icap/patches/patch-mpmt__server.c b/www/c-icap/patches/patch-mpmt__server.c
index 76582239e46..744350777ca 100644
--- a/www/c-icap/patches/patch-mpmt__server.c
+++ b/www/c-icap/patches/patch-mpmt__server.c
@@ -1,9 +1,11 @@
-$NetBSD: patch-mpmt__server.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
+$NetBSD: patch-mpmt__server.c,v 1.2 2015/06/12 23:39:11 taca Exp $
---- mpmt_server.c.orig 2015-05-28 20:06:15.000000000 +0000
+Avoid CONF name colision.
+
+--- mpmt_server.c.orig 2014-10-23 09:20:46.000000000 +0000
+++ mpmt_server.c
-@@ -55,7 +55,7 @@ extern int MIN_FREE_SERVERS;
- extern int MAX_FREE_SERVERS;
+@@ -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;
@@ -11,7 +13,88 @@ $NetBSD: patch-mpmt__server.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
typedef struct server_decl {
int srv_id;
-@@ -1035,11 +1035,11 @@ int start_server()
+@@ -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;
@@ -25,7 +108,30 @@ $NetBSD: patch-mpmt__server.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
exit(0);
}
-@@ -1077,7 +1077,7 @@ int start_server()
+@@ -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);
@@ -34,3 +140,43 @@ $NetBSD: patch-mpmt__server.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
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
index d98e237b4d1..1720cf1e73c 100644
--- a/www/c-icap/patches/patch-service.c
+++ b/www/c-icap/patches/patch-service.c
@@ -1,6 +1,8 @@
-$NetBSD: patch-service.c,v 1.1 2015/06/02 20:02:45 joerg Exp $
+$NetBSD: patch-service.c,v 1.2 2015/06/12 23:39:11 taca Exp $
---- service.c.orig 2015-05-28 20:06:13.000000000 +0000
+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];
diff --git a/www/c-icap/patches/patch-winnt__server.c b/www/c-icap/patches/patch-winnt__server.c
new file mode 100644
index 00000000000..e067164ce76
--- /dev/null
+++ b/www/c-icap/patches/patch-winnt__server.c
@@ -0,0 +1,99 @@
+$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;