aboutsummaryrefslogtreecommitdiffstats
path: root/tap-dcerpcstat.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-09-03 10:10:18 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-09-03 10:10:18 +0000
commitbb21d8c03cb8928d5d50b9b8533fe53cf756f9ba (patch)
treeba251eda87a4062d5090a3d4bb3bf3296ccbada5 /tap-dcerpcstat.c
parente2ec56553eb128897c9de8cfe00e8268b1cb4ce1 (diff)
fix to various stats tables.
The code used to rely on min_time==0 to determine whether this was the first packet or not and whereby we had to initialize min_time to the current value. This obviously does not work for capture files with poor timestamp resolution where the response time is actually, according to the capture file, 0 and we got all sorts of weird effects like average response time being less than the minimum response time. note, the bug only affected the minimum response time in the tables and not max or average response time. it would "miss" tose minimum response times that were ==0 and display the minumin response time in the capture that were >0 svn path=/trunk/; revision=8358
Diffstat (limited to 'tap-dcerpcstat.c')
-rw-r--r--tap-dcerpcstat.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tap-dcerpcstat.c b/tap-dcerpcstat.c
index df5e48c473..1ef20c3fb5 100644
--- a/tap-dcerpcstat.c
+++ b/tap-dcerpcstat.c
@@ -1,7 +1,7 @@
/* tap-dcerpcstat.c
* dcerpcstat 2002 Ronnie Sahlberg
*
- * $Id: tap-dcerpcstat.c,v 1.5 2003/04/23 08:20:01 guy Exp $
+ * $Id: tap-dcerpcstat.c,v 1.6 2003/09/03 10:10:17 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -110,14 +110,12 @@ dcerpcstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, void *
delta.secs--;
}
- if((rp->max.secs==0)
- && (rp->max.nsecs==0) ){
+ if(rp->num==0){
rp->max.secs=delta.secs;
rp->max.nsecs=delta.nsecs;
}
- if((rp->min.secs==0)
- && (rp->min.nsecs==0) ){
+ if(rp->num==0){
rp->min.secs=delta.secs;
rp->min.nsecs=delta.nsecs;
}
@@ -142,6 +140,7 @@ dcerpcstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, void *
rp->tot.nsecs-=1000000000;
rp->tot.secs++;
}
+
rp->num++;
return 1;