aboutsummaryrefslogtreecommitdiffstats
path: root/proto_hier_stats.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-01-09 21:38:21 +0000
committerGuy Harris <guy@alum.mit.edu>2004-01-09 21:38:21 +0000
commit84dcd53b03d15474bebc7431c52aa8029d2b3f97 (patch)
treeb9df881a349c0f7b3a5ef5abb1b7d5c04c7c90e6 /proto_hier_stats.c
parent3f75fe32918530084706e78f969642d5a38e25bf (diff)
We don't need to keep the progress bar quantum or next step in the
capture_file structure - just make it local to the routine scanning through the packets. svn path=/trunk/; revision=9616
Diffstat (limited to 'proto_hier_stats.c')
-rw-r--r--proto_hier_stats.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/proto_hier_stats.c b/proto_hier_stats.c
index 641ee0d24c..5a3346a09b 100644
--- a/proto_hier_stats.c
+++ b/proto_hier_stats.c
@@ -1,7 +1,7 @@
/* proto_hier_stats.c
* Routines for calculating statistics based on protocol.
*
- * $Id: proto_hier_stats.c,v 1.20 2003/12/04 10:59:33 guy Exp $
+ * $Id: proto_hier_stats.c,v 1.21 2004/01/09 21:38:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -164,6 +164,8 @@ ph_stats_new(void)
float prog_val;
GTimeVal start_time;
gchar status_str[100];
+ int progbar_nextstep;
+ int progbar_quantum;
/* Initialize the data */
ps = g_new(ph_stats_t, 1);
@@ -172,10 +174,10 @@ ph_stats_new(void)
ps->stats_tree = g_node_new(NULL);
/* Update the progress bar when it gets to this value. */
- cfile.progbar_nextstep = 0;
+ progbar_nextstep = 0;
/* When we reach the value that triggers a progress bar update,
bump that value by this amount. */
- cfile.progbar_quantum = cfile.count/N_PROGBAR_UPDATES;
+ progbar_quantum = cfile.count/N_PROGBAR_UPDATES;
/* Count of packets at which we've looked. */
count = 0;
@@ -192,7 +194,7 @@ ph_stats_new(void)
may involve an "ioctl()" to see if there's any pending
input from an X server, and doing that for every packet
can be costly, especially on a big file. */
- if (count >= cfile.progbar_nextstep) {
+ if (count >= progbar_nextstep) {
/* let's not divide by zero. I should never be started
* with count == 0, so let's assert that
*/
@@ -212,7 +214,7 @@ ph_stats_new(void)
update_progress_dlg(progbar, prog_val, status_str);
}
- cfile.progbar_nextstep += cfile.progbar_quantum;
+ progbar_nextstep += progbar_quantum;
}
if (stop_flag) {