Fix for bug 4323 & 4511:
authorStig Bjørlykke <stig@bjorlykke.org>
Wed, 24 Feb 2010 20:24:05 +0000 (20:24 -0000)
committerStig Bjørlykke <stig@bjorlykke.org>
Wed, 24 Feb 2010 20:24:05 +0000 (20:24 -0000)
Call col_custom_prime_edt() when having custom columns on print and
export to csv and psml.

svn path=/trunk/; revision=31990

file.c

diff --git a/file.c b/file.c
index 19384e66f2a81be65ee31171d89f4ed7e7fe0fb9..fe7ac33d184dd31a6d8bbd088625e874aca7eec4 100644 (file)
--- a/file.c
+++ b/file.c
@@ -2604,6 +2604,8 @@ print_packet(capture_file *cf, frame_data *fdata,
   /* Fill in the column information if we're printing the summary
      information. */
   if (args->print_args->print_summary) {
+    if (have_custom_cols(&cf->cinfo))
+      col_custom_prime_edt(&edt, &cf->cinfo);
     epan_dissect_run(&edt, pseudo_header, pd, fdata, &cf->cinfo);
     epan_dissect_fill_in_columns(&edt, FALSE, TRUE);
   } else
@@ -2936,6 +2938,8 @@ write_psml_packet(capture_file *cf, frame_data *fdata,
      if having custom columns. */
   proto_tree_needed = have_custom_cols(&cf->cinfo);
   epan_dissect_init(&edt, proto_tree_needed, proto_tree_needed);
+  if (proto_tree_needed)
+    col_custom_prime_edt(&edt, &cf->cinfo);
   epan_dissect_run(&edt, pseudo_header, pd, fdata, &cf->cinfo);
   epan_dissect_fill_in_columns(&edt, FALSE, TRUE);
 
@@ -3010,6 +3014,8 @@ write_csv_packet(capture_file *cf, frame_data *fdata,
      if having custom columns. */
   proto_tree_needed = have_custom_cols(&cf->cinfo);
   epan_dissect_init(&edt, proto_tree_needed, proto_tree_needed);
+  if (proto_tree_needed)
+    col_custom_prime_edt(&edt, &cf->cinfo);
   epan_dissect_run(&edt, pseudo_header, pd, fdata, &cf->cinfo);
   epan_dissect_fill_in_columns(&edt, FALSE, TRUE);