diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-10-10 11:24:24 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-10-10 11:24:24 +0000 |
commit | 5b7b7ef16839789911026817b8b1adad4bfa1b35 (patch) | |
tree | d70edbc6de20efa5f8c45648b3c90dc123b65232 /gtk/dcerpc_stat.c | |
parent | e3da788a2a6496093add5e8dd0c90bc2c8ceabca (diff) | |
download | wireshark-5b7b7ef16839789911026817b8b1adad4bfa1b35.tar.gz wireshark-5b7b7ef16839789911026817b8b1adad4bfa1b35.tar.bz2 wireshark-5b7b7ef16839789911026817b8b1adad4bfa1b35.zip |
Fix a bug for the DCERPC stats window where it forgot to print the title inside the window as it were supposed to.
svn path=/trunk/; revision=8668
Diffstat (limited to 'gtk/dcerpc_stat.c')
-rw-r--r-- | gtk/dcerpc_stat.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gtk/dcerpc_stat.c b/gtk/dcerpc_stat.c index d85ac40bb7..998060b335 100644 --- a/gtk/dcerpc_stat.c +++ b/gtk/dcerpc_stat.c @@ -1,7 +1,7 @@ /* dcerpc_stat.c * dcerpc_stat 2002 Ronnie Sahlberg * - * $Id: dcerpc_stat.c,v 1.25 2003/10/10 11:11:37 sahlberg Exp $ + * $Id: dcerpc_stat.c,v 1.26 2003/10/10 11:24:24 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -81,13 +81,21 @@ uuid_equal(e_uuid_t *uuid1, e_uuid_t *uuid2) return 1; } +static char * +dcerpcstat_gen_title(rpcstat_t *rs) +{ + char *title; + + title = g_strdup_printf("DCE-RPC Service Response Time statistics for %s version %d.%d: %s", rs->prog, rs->ver&0xff, rs->ver>>8, cf_get_display_name(&cfile)); + return title; +} + static void dcerpcstat_set_title(rpcstat_t *rs) { char *title; - title = g_strdup_printf("DCE-RPC Service Response Time statistics for %s version %d.%d: %s", - rs->prog, rs->ver&0xff, rs->ver>>8, cf_get_display_name(&cfile)); + title = dcerpcstat_gen_title(rs); gtk_window_set_title(GTK_WINDOW(rs->win), title); g_free(title); } @@ -170,7 +178,7 @@ gtk_dcerpcstat_init(char *optarg) { rpcstat_t *rs; guint32 i, max_procs; - char title_string[256]; + char *title_string; char filter_string[256]; GtkWidget *vbox; GtkWidget *stat_label; @@ -229,7 +237,9 @@ gtk_dcerpcstat_init(char *optarg) gtk_container_set_border_width(GTK_CONTAINER(vbox), 10); gtk_widget_show(vbox); + title_string=dcerpcstat_gen_title(rs); stat_label=gtk_label_new(title_string); + g_free(title_string); gtk_box_pack_start(GTK_BOX(vbox), stat_label, FALSE, FALSE, 0); gtk_widget_show(stat_label); |