diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-03-14 16:14:15 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-03-14 23:14:38 +0000 |
commit | ba7e5e322e28909228bd3bfd251d5a727bc73ff4 (patch) | |
tree | f59acd1d98ed7c1a1574865e85fee5273b8629e7 /wiretap/vwr.c | |
parent | 55f6b2e04826fdd97b6d0eb26ac6cbd33d4b3589 (diff) |
len and caplen are derived independently, so set WTAP_HAS_CAP_LEN.
Fix presumed typo while we're at it.
Change-Id: Ic8ae6e6669e5c5fc618ec2516af98ba2390487ce
Reviewed-on: https://code.wireshark.org/review/660
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/vwr.c')
-rw-r--r-- | wiretap/vwr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/vwr.c b/wiretap/vwr.c index 6c50396d49..2074f5d83e 100644 --- a/wiretap/vwr.c +++ b/wiretap/vwr.c @@ -1124,7 +1124,7 @@ static int parse_s1_W_stats(vwr_t *vwr, struct wtap_pkthdr *phdr, guint8 *rec, octets = 0; /* Sanity check the octets field to determine if it is OK (or segfaults result). */ - /* ff it's greater, then truncate to actual record size. */ + /* iff it's greater, then truncate to actual record size. */ if (octets > (rec_size - 64)) octets = (rec_size - 64); msdu_length = octets; @@ -1165,7 +1165,7 @@ static int parse_s1_W_stats(vwr_t *vwr, struct wtap_pkthdr *phdr, guint8 *rec, phdr->len = (msdu_length - 4) + r_hdr_len; phdr->caplen = (octets - 4) + r_hdr_len; - phdr->presence_flags = WTAP_HAS_TS; + phdr->presence_flags = WTAP_HAS_TS|WTAP_HAS_CAP_LEN; phdr->ts.secs = (time_t)s_sec; phdr->ts.nsecs = (int)(s_usec * 1000); @@ -1428,7 +1428,7 @@ static int parse_s2_W_stats(vwr_t *vwr, struct wtap_pkthdr *phdr, tmp_len = (msdu_length - 4) + r_hdr_len; phdr->caplen = tmp_len<=G_MAXUINT32 ? (guint32) tmp_len : 0; - phdr->presence_flags = WTAP_HAS_TS; + phdr->presence_flags = WTAP_HAS_TS|WTAP_HAS_CAP_LEN; phdr->ts.secs = (time_t)s_sec; phdr->ts.nsecs = (int)(s_usec * 1000); |