aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-11-30 06:45:30 +0000
committerRoger Dingledine <arma@torproject.org>2005-11-30 06:45:30 +0000
commit77a425d8b2b2f4b62e09aaf64679b8c8731f88c2 (patch)
tree7e77f6ff27a936b7171da6073e3b0f94940d657c /src
parentd56a65c497fe8ca856a8e5842660ec720204e728 (diff)
downloadtor-77a425d8b2b2f4b62e09aaf64679b8c8731f88c2.tar
tor-77a425d8b2b2f4b62e09aaf64679b8c8731f88c2.tar.gz
Remove some functions that were around for hupping log files. We handle
them already in do_hup() by marking our log files as temporary and then rotating them in options_init_from_torrc(). svn:r5473
Diffstat (limited to 'src')
-rw-r--r--src/common/log.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/common/log.c b/src/common/log.c
index 93fd854f4..b45251964 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -67,9 +67,6 @@ static int syslog_count = 0;
static void delete_log(logfile_t *victim);
static void close_log(logfile_t *victim);
-#if 0
-static int reset_log(logfile_t *lf);
-#endif
/** Helper: Write the standard prefix for log lines to a
* <b>buf_len</b> character buffer in <b>buf</b>.
@@ -326,26 +323,6 @@ close_logs(void)
}
}
-#if 0
-/** Close and re-open all log files; used to rotate logs on SIGHUP. */
-/* Nobody uses this. Remove it? XXXX */
-void
-reset_logs(void)
-{
- logfile_t *lf = logfiles;
- while (lf) {
- if (reset_log(lf)) {
- /* error. don't log it. delete the log entry and continue. */
- logfile_t *victim = lf;
- lf = victim->next;
- delete_log(victim);
- continue;
- }
- lf = lf->next;
- }
-}
-#endif
-
/** Remove and free the log entry <b>victim</b> from the linked-list
* logfiles (it must be present in the list when this function is
* called). After this function is called, the caller shouldn't refer
@@ -384,26 +361,6 @@ close_log(logfile_t *victim)
}
}
-#if 0
-/** Helper: reset a single logfile_t. For a file log, this involves
- * closing and reopening the log, and maybe writing the version. For
- * other log types, do nothing. */
-static int
-reset_log(logfile_t *lf)
-{
- if (lf->needs_close) {
- if (fclose(lf->file)==EOF ||
- !(lf->file = fopen(lf->filename, "a"))) {
- return -1;
- } else {
- if (log_tor_version(lf, 1) < 0)
- return -1;
- }
- }
- return 0;
-}
-#endif
-
/** Add a log handler to send all messages of severity <b>loglevel</b>
* or higher to <b>stream</b>. */
void