aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2012-12-25 19:16:28 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2012-12-25 19:16:28 +0000
commit05827f38abd88bee25b4cb6ebdbed8de8adc4d6c (patch)
tree74b8da687a11ca1e44be22944535aee87439aecd /text2pcap.c
parent13a5f0b5da29fd21b3f173d9f3855ca4ca4e8bf0 (diff)
Add some debug output regarding preamble processing.
svn path=/trunk/; revision=46740
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/text2pcap.c b/text2pcap.c
index e1952e3acc..7c329e148c 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -897,6 +897,13 @@ parse_preamble (void)
int subseclen;
int i;
+ /*
+ * Null-terminate the preamble.
+ */
+ packet_preamble[packet_preamble_len] = '\0';
+ if (debug > 0)
+ fprintf(stderr, "[[parse_preamble: \"%s\"]]\n", packet_preamble);
+
/*
* If no "-t" flag was specified, don't attempt to parse a packet
* preamble to extract a time stamp.
@@ -915,10 +922,6 @@ parse_preamble (void)
timecode = timecode_default;
ts_usec = 0;
- /*
- * Null-terminate the preamble.
- */
- packet_preamble[packet_preamble_len] = '\0';
/* Ensure preamble has more than two chars before attempting to parse.
* This should cover line breaks etc that get counted.