aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/csids.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/csids.c')
-rw-r--r--wiretap/csids.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/wiretap/csids.c b/wiretap/csids.c
index 23f97c5749..61722f6dcb 100644
--- a/wiretap/csids.c
+++ b/wiretap/csids.c
@@ -136,7 +136,6 @@ int csids_open(wtap *wth, int *err, gchar **err_info)
if (file_seek(wth->fh, 0, SEEK_SET, err) == -1)
return -1;
- wth->data_offset = 0;
csids = (csids_t *)g_malloc(sizeof(csids_t));
wth->priv = (void *)csids;
csids->byteswapped = byteswap;
@@ -159,7 +158,7 @@ static gboolean csids_read(wtap *wth, int *err, gchar **err_info,
int bytesRead = 0;
struct csids_header hdr;
- *data_offset = wth->data_offset;
+ *data_offset = file_tell(wth->fh);
bytesRead = file_read( &hdr, sizeof( struct csids_header) , wth->fh );
if( bytesRead != sizeof( struct csids_header) ) {
@@ -171,8 +170,6 @@ static gboolean csids_read(wtap *wth, int *err, gchar **err_info,
hdr.seconds = pntohl(&hdr.seconds);
hdr.caplen = pntohs(&hdr.caplen);
- wth->data_offset += sizeof( struct csids_header );
-
/* Make sure we have enough room for the packet */
buffer_assure_space(wth->frame_buffer, hdr.caplen);
buf = buffer_start_ptr(wth->frame_buffer);
@@ -185,8 +182,6 @@ static gboolean csids_read(wtap *wth, int *err, gchar **err_info,
return FALSE;
}
- wth->data_offset += hdr.caplen;
-
wth->phdr.presence_flags = WTAP_HAS_TS;
wth->phdr.len = hdr.caplen;
wth->phdr.caplen = hdr.caplen;