diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-08-28 10:07:37 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-08-28 10:07:37 +0000 |
commit | 43e2ab4d7fd8b8ba1d4eed7639f172542e2cec91 (patch) | |
tree | 0d0ee2965686033c7aee032eb363afa81da06afb /proto_hier_stats.c | |
parent | 05a3dc7346e364637f660bb422078f315ab82840 (diff) |
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").
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6112 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'proto_hier_stats.c')
-rw-r--r-- | proto_hier_stats.c | 14 |
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; } |