[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Remove redundant stat() for reading cached directory, and r...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] Remove redundant stat() for reading cached directory, and r...
- From: arma@seul.org (Roger Dingledine)
- Date: Sun, 14 Nov 2004 04:40:10 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sun, 14 Nov 2004 04:40:34 -0500
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
routerlist.c
Log Message:
Remove redundant stat() for reading cached directory, and remove
confusing warn when the cached directory isn't there yet.
Index: routerlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -d -r1.184 -r1.185
--- routerlist.c 12 Nov 2004 19:39:13 -0000 1.184
+++ routerlist.c 14 Nov 2004 09:40:07 -0000 1.185
@@ -47,17 +47,11 @@
{
char filename[512];
int is_recent;
- struct stat st;
char *s;
tor_assert(get_options()->DataDirectory);
tor_snprintf(filename,sizeof(filename),"%s/cached-directory",
get_options()->DataDirectory);
- if (stat(filename, &st)) {
- log_fn(LOG_WARN, "Unable to check status for '%s': %s", filename,
- strerror(errno));
- return 0;
- }
s = read_file_to_str(filename,0);
if (s) {
log_fn(LOG_INFO, "Loading cached directory from %s", filename);