aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/commview.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/commview.c')
-rw-r--r--wiretap/commview.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/wiretap/commview.c b/wiretap/commview.c
index a2415fdcd7..f3c3e3ecb1 100644
--- a/wiretap/commview.c
+++ b/wiretap/commview.c
@@ -124,7 +124,6 @@ int commview_open(wtap *wth, int *err, gchar **err_info)
wth->subtype_read = commview_read;
wth->subtype_seek_read = commview_seek_read;
- wth->data_offset = 0;
wth->file_type = WTAP_FILE_COMMVIEW;
wth->file_encap = WTAP_ENCAP_PER_PACKET;
wth->tsprecision = WTAP_FILE_TSPREC_USEC;
@@ -162,13 +161,11 @@ commview_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
struct tm tm;
int bytes_read;
- *data_offset = wth->data_offset;
+ *data_offset = file_tell(wth->fh);
if(!commview_read_header(&cv_hdr, wth->fh, err, err_info))
return FALSE;
- wth->data_offset += COMMVIEW_HEADER_SIZE;
-
switch(cv_hdr.flags & FLAGS_MEDIUM) {
case MEDIUM_ETHERNET :
@@ -210,8 +207,6 @@ commview_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
tm.tm_sec = cv_hdr.seconds;
tm.tm_isdst = -1;
- wth->data_offset += cv_hdr.data_len;
-
wth->phdr.presence_flags = WTAP_HAS_TS;
wth->phdr.len = cv_hdr.data_len;