aboutsummaryrefslogtreecommitdiffstats
path: root/pcapio.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-02-22 14:41:02 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-02-22 14:41:02 +0000
commit8fff390455a8286a17de1ae9d1924f2301b80f96 (patch)
treef5616ae7e2a36d7fd30dad9d3b1d2b3d545ca19c /pcapio.c
parentaf2100d4c3abc5fac43e821fe589e7098ea99d9c (diff)
- Write ISB(s) at start and end of capture.
- Read all options. - Prepare to write ISB. svn path=/trunk/; revision=41137
Diffstat (limited to 'pcapio.c')
-rw-r--r--pcapio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/pcapio.c b/pcapio.c
index 3f02c703ad..3e10e80599 100644
--- a/pcapio.c
+++ b/pcapio.c
@@ -660,7 +660,7 @@ libpcap_write_interface_statistics_block(FILE *fp,
block_total_length += sizeof(struct option) + sizeof(guint64); /* ISB_STARTTIME */
have_options = TRUE;
}
- if (isb_endtime) {
+ if (isb_endtime !=0) {
block_total_length += sizeof(struct option) + sizeof(guint64); /* ISB_ENDTIME */
have_options = TRUE;
}
@@ -690,14 +690,12 @@ libpcap_write_interface_statistics_block(FILE *fp,
if (isb_starttime !=0) {
option.type = ISB_STARTTIME;
option.value_length = sizeof(guint64);
- counter = stats.ps_recv;
WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err);
WRITE_DATA(fp, &isb_starttime, sizeof(guint64), *bytes_written, err);
}
- if (isb_endtime) {
+ if (isb_endtime !=0) {
option.type = ISB_ENDTIME;
option.value_length = sizeof(guint64);
- counter = stats.ps_recv;
WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err);
WRITE_DATA(fp, &isb_endtime, sizeof(guint64), *bytes_written, err);
}