16f1f17d67
Add three patches: patch-aa: If you use CHUNK_INPUT without this patch, you end up with many error messages xferstats in free(): warning: modified (chunk-) pointer (or you may want to fix chunks...) patch-ab: If number of "Files Transmitted" is divisible by CHUNK_INPUT without this patch, you end up with error "No data to process." instead of results. patch-ac: Typical beginner's bug in C: feof() is used before read function, where its result is not tested then. Without this patch the last line is counted twice. PR: 44015 Submitted by: Cejka Rudolf <cejkar@fit.vutbr.cz>
23 lines
589 B
Text
23 lines
589 B
Text
--- xferstats.x Thu Jan 11 19:49:22 2001
|
|
+++ xferstats.c Thu Jan 11 19:50:31 2001
|
|
@@ -2486,6 +2486,7 @@
|
|
{
|
|
pointers_t * pointers;
|
|
char * default_logfile;
|
|
+ int first = 1;
|
|
|
|
/* unbuffer stdout and stderr so output isn't lost */
|
|
setbuf(stdout, NULL);
|
|
@@ -2559,10 +2560,11 @@
|
|
|
|
G_BLOW_CHUNKS();
|
|
|
|
- if (!pointers->first_ftp_line) {
|
|
+ if (first && !pointers->first_ftp_line) {
|
|
fprintf(stderr, "No data to process.\n");
|
|
exit(0);
|
|
}
|
|
+ first = 0;
|
|
|
|
generate_daily_data(pointers, pointers->first_ftp_line);
|
|
if (pointers->config->dow_traffic)
|