aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/service_response_time_table.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2004-04-07 04:31:32 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2004-04-07 04:31:32 +0000
commit55aab5b071e163d09d8bd833212805a28a3ea6c4 (patch)
tree4e70e314bb7016278a7b0afa48cafcf8c8556afa /gtk/service_response_time_table.c
parent561d8c9cb03fab31fa43894484e07b7305b1dcb9 (diff)
make service response time statistics work for "unknown" rpc programs.
all proicedures will however get "interesting" names such as "proc-1" etc except procedure 0 which is ALWAYS "NULL" svn path=/trunk/; revision=10557
Diffstat (limited to 'gtk/service_response_time_table.c')
-rw-r--r--gtk/service_response_time_table.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/gtk/service_response_time_table.c b/gtk/service_response_time_table.c
index bebe8d534e..3092096252 100644
--- a/gtk/service_response_time_table.c
+++ b/gtk/service_response_time_table.c
@@ -3,7 +3,7 @@
* Helper routines common to all service response time statistics
* tap.
*
- * $Id: service_response_time_table.c,v 1.16 2004/03/13 15:15:25 ulfl Exp $
+ * $Id: service_response_time_table.c,v 1.17 2004/04/07 04:31:32 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -430,7 +430,25 @@ init_srt_table_row(srt_stat_table *rst, int index, char *procedure)
{
char str[10];
-
+ /* we have discovered a new procedure. Extend the table accordingly */
+ if(index>=rst->num_procs){
+ int old_num_procs=rst->num_procs;
+ int i,j;
+ rst->num_procs=index+1;
+ rst->procedures=g_realloc(rst->procedures, sizeof(srt_procedure_t)*(rst->num_procs));
+ for(i=old_num_procs;i<rst->num_procs;i++){
+ rst->procedures[i].num=0;
+ rst->procedures[i].min.secs=0;
+ rst->procedures[i].min.nsecs=0;
+ rst->procedures[i].max.secs=0;
+ rst->procedures[i].max.nsecs=0;
+ rst->procedures[i].tot.secs=0;
+ rst->procedures[i].tot.nsecs=0;
+ for(j=0;j<6;j++){
+ rst->procedures[i].entries[j]=NULL;
+ }
+ }
+ }
g_snprintf(str, 10, "%d",index);
rst->procedures[index].entries[0]=g_strdup(str);