diff options
author | erdgeist <> | 2009-01-26 11:30:10 +0000 |
---|---|---|
committer | erdgeist <> | 2009-01-26 11:30:10 +0000 |
commit | f8185878fb8465961231d8827a6f9050feef9a8f (patch) | |
tree | 3bba2af39c4d3a9de0fc9f562e30b66344246ab1 /ot_stats.c | |
parent | 1d821b95cb922fadb3b5c4d71f437700f840990a (diff) |
Make snprintf write to the correct location
Diffstat (limited to 'ot_stats.c')
-rw-r--r-- | ot_stats.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -565,7 +565,7 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event | |||
565 | char _debug[512]; | 565 | char _debug[512]; |
566 | int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 ); | 566 | int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 ); |
567 | off += fmt_ip6( _debug+off, *ip ); | 567 | off += fmt_ip6( _debug+off, *ip ); |
568 | off += snprintf( _debug, sizeof(_debug)-off, " - FULL SCRAPE\n" ); | 568 | off += snprintf( _debug+off, sizeof(_debug)-off, " - FULL SCRAPE\n" ); |
569 | write( 2, _debug, off ); | 569 | write( 2, _debug, off ); |
570 | ot_full_scrape_request_count++; | 570 | ot_full_scrape_request_count++; |
571 | } | 571 | } |
@@ -576,7 +576,7 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event | |||
576 | char _debug[512]; | 576 | char _debug[512]; |
577 | int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 ); | 577 | int off = snprintf( _debug, sizeof(_debug), "[%08d] scrp: ", (unsigned int)(g_now_seconds - ot_start_time)/60 ); |
578 | off += fmt_ip6(_debug+off, *ip ); | 578 | off += fmt_ip6(_debug+off, *ip ); |
579 | off += snprintf( _debug, sizeof(_debug)-off, " - FULL SCRAPE\n" ); | 579 | off += snprintf( _debug+off, sizeof(_debug)-off, " - FULL SCRAPE\n" ); |
580 | write( 2, _debug, off ); | 580 | write( 2, _debug, off ); |
581 | ot_full_scrape_request_count++; | 581 | ot_full_scrape_request_count++; |
582 | } | 582 | } |