summaryrefslogtreecommitdiff
path: root/ot_stats.c
diff options
context:
space:
mode:
authorerdgeist <>2010-12-11 15:50:56 +0000
committererdgeist <>2010-12-11 15:50:56 +0000
commit85df3dbc016578481bf6c7e532e40c657a0b9b50 (patch)
tree39dfaca9ddc85db7d6ef8dc354c3a2e153b05079 /ot_stats.c
parent09adf4a9e15a04217df64adcba64e5e683ff24f8 (diff)
Open syslog connection before dropping privileges
Diffstat (limited to 'ot_stats.c')
-rw-r--r--ot_stats.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/ot_stats.c b/ot_stats.c
index b6469f9..064f364 100644
--- a/ot_stats.c
+++ b/ot_stats.c
@@ -745,17 +745,10 @@ static pthread_t thread_id;
745void stats_init( ) { 745void stats_init( ) {
746 ot_start_time = g_now_seconds; 746 ot_start_time = g_now_seconds;
747 pthread_create( &thread_id, NULL, stats_worker, NULL ); 747 pthread_create( &thread_id, NULL, stats_worker, NULL );
748#ifdef WANT_SYSLOGS
749 openlog( "opentracker", 0, LOG_USER );
750 setlogmask(LOG_UPTO(LOG_INFO));
751#endif
752} 748}
753 749
754void stats_deinit( ) { 750void stats_deinit( ) {
755 pthread_cancel( thread_id ); 751 pthread_cancel( thread_id );
756#ifdef WANT_SYSLOGS
757 closelog();
758#endif
759} 752}
760 753
761const char *g_version_stats_c = "$Source$: $Revision$\n"; 754const char *g_version_stats_c = "$Source$: $Revision$\n";