Ethereal-dev: [Ethereal-dev] Update to composite expert statistics

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Greg Morris" <gmorris@xxxxxxxxxx>
Date: Wed, 01 Mar 2006 17:39:54 +0100
Use local variable space instead of pointer.
The previous implementation utilized pointers and the values would change the table data.
 
Please apply,
 
Greg
Index: expert_comp_table.c
===================================================================
--- expert_comp_table.c	(revision 17420)
+++ expert_comp_table.c	(working copy)
@@ -573,9 +573,9 @@
 		}
         err->procedures[err->num_procs].packet_num = (guint32)expert_data->packet_num;                        /* First packet num */
 	}
-	err->procedures[err->num_procs].entries[0]=(char *)val_to_str(expert_data->group, expert_group_vals,"Unknown group (%u)");   /* Group */
-    err->procedures[err->num_procs].entries[1]=(char *)expert_data->protocol;                                 /* Protocol */
-    err->procedures[err->num_procs].entries[2]=(char *)expert_data->summary;                                  /* Summary */
+	err->procedures[err->num_procs].entries[0]=(char *)g_strdup_printf("%s", val_to_str(expert_data->group, expert_group_vals,"Unknown group (%u)"), NULL);   /* Group */
+    err->procedures[err->num_procs].entries[1]=(char *)g_strdup_printf("%s", expert_data->protocol, NULL);    /* Protocol */
+    err->procedures[err->num_procs].entries[2]=(char *)g_strdup_printf("%s", expert_data->summary, NULL);     /* Summary */
 	err->procedures[err->num_procs].entries[3]=(char *)g_strdup_printf("%d", err->procedures[row].count);     /* Count */
     err->procedures[err->num_procs].fvalue_value = NULL;
     if (expert_data->pitem && strcmp(expert_data->pitem->finfo->value.ftype->name,"FT_NONE")!=0) {