diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-09-25 21:06:32 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-09-25 21:06:32 +0000 |
commit | 02c71a7eb4ddbe3841a7b804a99b7b509e05a9d9 (patch) | |
tree | b86dd38756044645f158c157a2b5279289198739 /src/or/geoip.c | |
parent | e06f140f978cb95c3f4655f24ccdf1753a04d230 (diff) | |
download | tor-02c71a7eb4ddbe3841a7b804a99b7b509e05a9d9.tar.gz tor-02c71a7eb4ddbe3841a7b804a99b7b509e05a9d9.zip |
Widen the conditions under which we whine about not having a geoip file to include "a country code was configured in a node list."
svn:r16968
Diffstat (limited to 'src/or/geoip.c')
-rw-r--r-- | src/or/geoip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c index e948d60de4..a0f0d4ae90 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -178,10 +178,12 @@ int geoip_load_file(const char *filename, or_options_t *options) { FILE *f; - int severity = should_record_bridge_info(options) ? LOG_WARN : LOG_INFO; + const char *msg = ""; + int severity = options_need_geoip_info(options, &msg) ? LOG_WARN : LOG_INFO; clear_geoip_db(); if (!(f = fopen(filename, "r"))) { - log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s.", filename); + log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s. %s", + filename, msg); return -1; } if (!geoip_countries) { @@ -193,7 +195,7 @@ geoip_load_file(const char *filename, or_options_t *options) smartlist_free(geoip_entries); } geoip_entries = smartlist_create(); - log_info(LD_GENERAL, "Parsing GEOIP file."); + log_notice(LD_GENERAL, "Parsing GEOIP file."); while (!feof(f)) { char buf[512]; if (fgets(buf, (int)sizeof(buf), f) == NULL) |