aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-04-17 22:44:13 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-04-17 22:44:13 +0000
commitfa84e2bce64e99228ee5e4822269e235cc5a4b4f (patch)
tree95e0ea423606186e773e995f0ce1c51e828d71b2 /file.c
parent59d93584b226eaae99dfe7430689f32a00ef564a (diff)
bugfix: show the right filesize after a live capture finished
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14118 f5534014-38df-0310-8fa8-9805f1628bb7
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)
{