aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-04-17 22:44:13 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-04-17 22:44:13 +0000
commit55e312bb4130734243a4b32c4d1eb50e78c6c45e (patch)
tree95e0ea423606186e773e995f0ce1c51e828d71b2 /file.c
parent5caccdd94ec8d6508699965ed5e1d4b5d807c1c4 (diff)
bugfix: show the right filesize after a live capture finished
svn path=/trunk/; revision=14118
Diffstat (limited to 'file.c')
-rw-r--r--file.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/file.c b/file.c
index 4fec53463f..f4055d7ed9 100644
--- a/file.c
+++ b/file.c
@@ -625,6 +625,20 @@ cf_finish_tail(capture_file *cf, int *err)
}
#endif /* HAVE_LIBPCAP */
+
+/* update the f_len field */
+cf_update_f_len(capture_file *cf) {
+ int fd;
+ struct stat cf_stat;
+
+
+ fd = wtap_fd(cf->wth);
+ if (fstat(fd, &cf_stat) >= 0) {
+ cf->f_len = cf_stat.st_size;
+ }
+}
+
+
const gchar *
cf_get_display_name(capture_file *cf)
{