Browse Source

Make snprintf write to the correct location

master
Dirk Engling 13 years ago
parent
commit
74d96438c6
  1. 6
      ot_stats.c

6
ot_stats.c

@ -565,7 +565,7 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event
char _debug[512];
int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 );
off += fmt_ip6( _debug+off, *ip );
off += snprintf( _debug, sizeof(_debug)-off, " - FULL SCRAPE\n" );
off += snprintf( _debug+off, sizeof(_debug)-off, " - FULL SCRAPE\n" );
write( 2, _debug, off );
ot_full_scrape_request_count++;
}
@ -576,7 +576,7 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event
char _debug[512];
int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 );
off += fmt_ip6(_debug+off, *ip );
off += snprintf( _debug, sizeof(_debug)-off, " - FULL SCRAPE\n" );
off += snprintf( _debug+off, sizeof(_debug)-off, " - FULL SCRAPE\n" );
write( 2, _debug, off );
ot_full_scrape_request_count++;
}
@ -625,4 +625,4 @@ void stats_deinit( ) {
pthread_cancel( thread_id );
}
const char *g_version_stats_c = "$Source: /home/cvsroot/opentracker/ot_stats.c,v $: $Revision: 1.38 $\n";
const char *g_version_stats_c = "$Source: /home/cvsroot/opentracker/ot_stats.c,v $: $Revision: 1.39 $\n";

Loading…
Cancel
Save