[or-cvs] a better clean-up
arma at seul.org
arma at seul.org
Sun Mar 12 20:51:04 UTC 2006
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
main.c
Log Message:
a better clean-up
Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.629
retrieving revision 1.630
diff -u -p -d -r1.629 -r1.630
--- main.c 12 Mar 2006 20:48:59 -0000 1.629
+++ main.c 12 Mar 2006 20:51:02 -0000 1.630
@@ -1539,12 +1539,13 @@ tor_cleanup(void)
or_options_t *options = get_options();
/* Remove our pid file. We don't care if there was an error when we
* unlink, nothing we could do about it anyways. */
- if (options->PidFile && options->command == CMD_RUN_TOR)
- unlink(options->PidFile);
- if (accounting_is_enabled(options))
- accounting_record_bandwidth_usage(time(NULL));
- if (options->command == CMD_RUN_TOR)
+ if (options->command == CMD_RUN_TOR) {
+ if (options->PidFile)
+ unlink(options->PidFile);
+ if (accounting_is_enabled(options))
+ accounting_record_bandwidth_usage(time(NULL));
or_state_save();
+ }
tor_free_all(0); /* move tor_free_all back into the ifdef below later. XXX*/
crypto_global_cleanup();
#ifdef USE_DMALLOC
More information about the tor-commits
mailing list