changes of the coloring rules sometimes crashed as dissection keeps pointers to the...
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 3 Oct 2006 22:32:03 +0000 (22:32 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 3 Oct 2006 22:32:03 +0000 (22:32 +0000)
for now, don't delete the filters but keep them floating around in memory (leaking) -> at least better than crashing

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19421 f5534014-38df-0310-8fa8-9805f1628bb7

color_filters.c
file.c

index aaa132bccffd6589989900e170ca5c0b9ca715e7..c8183513d4f4d7ba5eec407ce46c15c9f678fb33 100644 (file)
@@ -190,7 +190,17 @@ void
 color_filters_apply(GSList *cfl)
 {
         /* remove "old" entries */
-        color_filter_list_delete(&color_filter_list);
+/*        color_filter_list_delete(&color_filter_list);*/
+
+        /* deleting the color filters crashes unpredictably 
+         * (e.g. sometimes while clearing the list) :-(
+         *
+         * for now, just clear the list and let the filters remain in memory
+         * until WS is closed -> memory leak
+         *
+         * XXX - move the filters to a "removed list" as before
+         * and delete them if the file is closed (or on rescan of packets or such?) */
+        color_filter_list = NULL;
 
         /* clone all list entries from edit to normal list */
         color_filter_list = color_filter_list_clone(cfl);
diff --git a/file.c b/file.c
index 8007e848f8c8dddea8b4ce58109218b87840d256..4bf10ccb53693be438ad338f83ca4c7646f34905 100644 (file)
--- a/file.c
+++ b/file.c
@@ -3068,16 +3068,6 @@ cf_select_packet(capture_file *cf, int row)
   /* We don't need the columns here. */
   cf->edt = epan_dissect_new(TRUE, TRUE);
 
-  /* colorize packet: coloring rules might be changed (removed) since last run,
-     recalculate now.
-     if packet is marked, use preferences, otherwise try to apply color filters */
-  if (fdata->flags.marked) {
-      fdata->color_filter = NULL;
-      packet_list_set_colors(row, &prefs.gui_marked_fg, &prefs.gui_marked_bg);
-  } else {
-      fdata->color_filter = color_filters_colorize_packet(row, cf->edt);
-  }
-
   epan_dissect_run(cf->edt, &cf->pseudo_header, cf->pd, cf->current_frame,
           NULL);