diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-19 23:05:02 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-19 23:05:02 +0000 |
commit | 7551c44a5375c390b653c7b8f28d904a3156e1ae (patch) | |
tree | f68e822086b38828df32583d165135fc148c4768 /src/or/routerlist.c | |
parent | 126a3f699a8ed6f9c4d2b6c5f4b09f8be159fdd8 (diff) | |
download | tor-7551c44a5375c390b653c7b8f28d904a3156e1ae.tar.gz tor-7551c44a5375c390b653c7b8f28d904a3156e1ae.zip |
r9274@Kushana: nickm | 2006-10-19 16:16:58 -0400
Add unit tests for tor_mmap_file(); make tor_mmap_t.size always be the size of the file (not the size of the mapping); add an extra argument to read_file_to_str() so it can return the size of the result string.
svn:r8762
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 2f7e0e096e..25e54dfef7 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -136,7 +136,7 @@ router_reload_networkstatus(void) } tor_snprintf(filename,sizeof(filename),"%s/cached-status/%s", get_options()->DataDirectory, fn); - s = read_file_to_str(filename, 0); + s = read_file_to_str(filename, 0, NULL); if (s) { stat(filename, &st); if (router_set_networkstatus(s, st.st_mtime, NS_FROM_CACHE, NULL)<0) { @@ -369,7 +369,7 @@ router_reload_router_list(void) tor_snprintf(fname, fname_len, "%s/cached-routers.new", options->DataDirectory); - contents = read_file_to_str(fname, 1); + contents = read_file_to_str(fname, 1, NULL); if (contents) { stat(fname, &st); router_load_routers_from_string(contents, |