X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=loadcfg.c;h=672f0415755531e820a990c1f3773a3a35047ca8;hp=085f47084fe131606e64d7c796aad620e4955fa7;hb=5830cbd0c477214cec7f140023a7249a2d346b26;hpb=b8a3f42d3acb904a23af1fd82fc87d1f8e0fd0a5
diff --git a/loadcfg.c b/loadcfg.c
index 085f4708..672f0415 100644
--- a/loadcfg.c
+++ b/loadcfg.c
@@ -1,4 +1,4 @@
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.66 2007/08/05 14:02:09 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.70 2007/12/15 14:24:05 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
@@ -35,6 +35,20 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.66 2007/08/05 14:02:09 fabiankeil
*
* Revisions :
* $Log: loadcfg.c,v $
+ * Revision 1.70 2007/12/15 14:24:05 fabiankeil
+ * Plug memory leak if listen-address only specifies the port.
+ *
+ * Revision 1.69 2007/10/27 13:02:27 fabiankeil
+ * Relocate daemon-mode-related log messages to make sure
+ * they aren't shown again in case of configuration reloads.
+ *
+ * Revision 1.68 2007/10/19 16:32:34 fabiankeil
+ * Plug memory leak introduced with my last commit.
+ *
+ * Revision 1.67 2007/10/14 14:12:41 fabiankeil
+ * When in daemon mode, close stderr after the configuration file has been
+ * parsed the first time. If logfile isn't set, stop logging. Fixes BR#897436.
+ *
* Revision 1.66 2007/08/05 14:02:09 fabiankeil
* #1763173 from Stefan Huehner: declare unload_configfile() static.
*
@@ -1298,10 +1312,13 @@ struct configuration_spec * load_config(void)
* In logdir by default
* *************************************************************************/
case hash_logfile :
- logfile = make_path(config->logdir, arg);
- if (NULL == logfile)
+ if (!no_daemon)
{
- log_error(LOG_LEVEL_FATAL, "Out of memore while creating logfile path");
+ logfile = make_path(config->logdir, arg);
+ if (NULL == logfile)
+ {
+ log_error(LOG_LEVEL_FATAL, "Out of memory while creating logfile path");
+ }
}
continue;
@@ -1594,7 +1611,7 @@ struct configuration_spec * load_config(void)
log_error(LOG_LEVEL_ERROR, "Ignoring unrecognized directive '%s' (%luul) in line %lu "
"in configuration file (%s).", buf, hash_string(cmd), linenum, configfile);
string_append(&config->proxy_args,
- " WARNING: unrecognized directive, ignored");
+ " Warning: ignored unrecognized directive above.
");
continue;
/* *************************************************************************/
@@ -1612,13 +1629,10 @@ struct configuration_spec * load_config(void)
if (NULL != logfile)
{
config->logfile = logfile;
- log_error(LOG_LEVEL_INFO,
- "Switching to daemon mode. Log messages will be written to: %s", config->logfile);
init_error_log(Argv[0], config->logfile);
}
else
{
- log_error(LOG_LEVEL_INFO, "No logfile configured while in daemon mode. Logging disabled.");
disable_logging();
}
}
@@ -1681,7 +1695,11 @@ struct configuration_spec * load_config(void)
}
if (*config->haddr == '\0')
{
- config->haddr = NULL;
+ /*
+ * Only the port specified. We stored it in config->hport
+ * and don't need its text representation anymore.
+ */
+ freez(config->haddr);
}
}