summaryrefslogtreecommitdiff
path: root/proto_hier_stats.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-08-28 10:07:37 +0000
committerGuy Harris <guy@alum.mit.edu>2002-08-28 10:07:37 +0000
commitabe6b6bcc8e56b3606dec883ead36658a296088e (patch)
tree0d0ee2965686033c7aee032eb363afa81da06afb /proto_hier_stats.c
parent666f3feec35f96f3cf0a0edbac0299efcf705545 (diff)
downloadwireshark-abe6b6bcc8e56b3606dec883ead36658a296088e.tar.gz
From Ulf Lamping: extend the progress dialog box to give more progress
information. Fix the types of some variables (make the file position in "read_cap_file()" a "long", as Wiretap supports "long" offsets, and make processed-packet counts in packet-processing loops "int"s, as the total packet count in a "capture_file" structure is an "int"). svn path=/trunk/; revision=6112
Diffstat (limited to 'proto_hier_stats.c')
-rw-r--r--proto_hier_stats.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/proto_hier_stats.c b/proto_hier_stats.c
index db2e65ab91..b95c3aa538 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.14 2002/07/30 10:13:14 guy Exp $
+ * $Id: proto_hier_stats.c,v 1.15 2002/08/28 10:07:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -154,9 +154,10 @@ ph_stats_new(void)
guint tot_packets, tot_bytes;
progdlg_t *progbar = NULL;
gboolean stop_flag;
- long count;
+ int count;
float prog_val;
GTimeVal start_time;
+ gchar status_str[100];
/* Initialize the data */
ps = g_new(ph_stats_t, 1);
@@ -196,11 +197,14 @@ ph_stats_new(void)
if (progbar == NULL)
/* Create the progress bar if necessary */
progbar = delayed_create_progress_dlg(
- "Computing protocol statistics", "Stop",
+ "Computing", "protocol hierarchy statistics", "Stop",
&stop_flag, &start_time, prog_val);
- if (progbar != NULL)
- update_progress_dlg(progbar, prog_val);
+ if (progbar != NULL) {
+ g_snprintf(status_str, sizeof(status_str),
+ "%4u of %u frames", count, cfile.count);
+ update_progress_dlg(progbar, prog_val, status_str);
+ }
cfile.progbar_nextstep += cfile.progbar_quantum;
}