aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2012-12-25 17:45:04 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2012-12-25 17:45:04 +0000
commit4abfc131499fcfe8ae0e85a3abda6dc20a10515c (patch)
tree1a2f8366edb516a897ba0349963d9ca7ea85b5c3 /text2pcap.c
parentf8d48662c872813a62c4b87cad4fd5b1afc2fd3c (diff)
Clear preamble if no timespec is given.
svn path=/trunk/; revision=46738
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/text2pcap.c b/text2pcap.c
index c2c342fa30..e1952e3acc 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -901,8 +901,11 @@ parse_preamble (void)
* If no "-t" flag was specified, don't attempt to parse a packet
* preamble to extract a time stamp.
*/
- if (ts_fmt == NULL)
+ if (ts_fmt == NULL) {
+ /* Clear Preamble */
+ packet_preamble_len = 0;
return;
+ }
/*
* Initialize to today localtime, just in case not all fields