aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-08-19 01:17:24 +0000
committerGuy Harris <guy@alum.mit.edu>2005-08-19 01:17:24 +0000
commite67b202e2c4b0b6bcf21bff9ad0fc724346c8d14 (patch)
treee7ca1bbae435f05ab942e776bf3bdd99a6c3eb42 /file.c
parent1e1df99990cac56d9c264bacd58d7409d67054c7 (diff)
Have "f_datalen" keep track of the number of bytes of uncompressed file
data, so that "f_len" still keeps the size of the underlying file (which is necessary in order to make the progress bar when files are being read work correctly). svn path=/trunk/; revision=15415
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.c b/file.c
index 74c8978a47..e79b8e3aaa 100644
--- a/file.c
+++ b/file.c
@@ -199,6 +199,7 @@ cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
cf->wth = wth;
cf->filed = fd;
+ cf->f_datalen = 0;
cf->f_len = cf_stat.st_size;
/* Set the file name because we need it to set the follow stream filter.
@@ -297,6 +298,7 @@ cf_reset_state(capture_file *cf)
packet_list_clear();
packet_list_thaw();
+ cf->f_datalen = 0;
cf->f_len = 0;
cf->count = 0;
cf->esec = 0;
@@ -891,7 +893,7 @@ read_packet(capture_file *cf, long offset)
cf->plist_end = fdata;
cf->count++;
- cf->f_len = offset + phdr->caplen;
+ cf->f_datalen = offset + phdr->caplen;
fdata->num = cf->count;
add_packet_to_packet_list(fdata, cf, pseudo_header, buf, TRUE);
} else {