summaryrefslogtreecommitdiff
path: root/www/c-icap/patches/patch-cfg__param.c
diff options
context:
space:
mode:
Diffstat (limited to 'www/c-icap/patches/patch-cfg__param.c')
-rw-r--r--www/c-icap/patches/patch-cfg__param.c84
1 files changed, 70 insertions, 14 deletions
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.
*/