bugfix: show the right filesize after a live capture finished
svn path=/trunk/; revision=14118
This commit is contained in:
parent
5caccdd94e
commit
55e312bb41
|
@ -308,7 +308,10 @@ capture_input_closed(capture_options *capture_opts)
|
|||
}
|
||||
|
||||
if(capture_opts->real_time_mode) {
|
||||
/* first of all, we are not doing a capture any more */
|
||||
/* first of all, update the file length field */
|
||||
cf_update_f_len(capture_opts->cf);
|
||||
|
||||
/* we are not doing a capture any more */
|
||||
cf_callback_invoke(cf_cb_live_capture_update_finished, capture_opts->cf);
|
||||
|
||||
/* Read what remains of the capture file, and finish the capture.
|
||||
|
|
14
file.c
14
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue