[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Make sequence of log messages when starting on win32 with n...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Make sequence of log messages when starting on win32 with n...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Mon, 3 Jan 2005 21:25:39 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Mon, 03 Jan 2005 21:25:57 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv17453/src/or
Modified Files:
config.c
Log Message:
Make sequence of log messages when starting on win32 with no config file more reasonable.
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.291
retrieving revision 1.292
diff -u -d -r1.291 -r1.292
--- config.c 3 Jan 2005 23:21:32 -0000 1.291
+++ config.c 4 Jan 2005 02:25:36 -0000 1.292
@@ -1669,6 +1669,7 @@
fname = fn;
} else {
tor_free(fn);
+#ifndef MS_WINDOWS
fn = expand_filename("~/.torrc");
if (fn && file_status(fn) == FN_FILE) {
fname = fn;
@@ -1676,13 +1677,16 @@
tor_free(fn);
fname = get_default_conf_file();
}
+#else
+ fname = get_default_conf_file();
+#endif
}
}
tor_assert(fname);
log(LOG_DEBUG, "Opening config file '%s'", fname);
- cf = read_file_to_str(fname, 0);
- if (!cf) {
+ if (file_status(fname) != FN_FILE ||
+ !(cf = read_file_to_str(fname,0))) {
if (using_default_torrc == 1) {
log(LOG_NOTICE, "Configuration file '%s' not present, "
"using reasonable defaults.", fname);