summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-03-18 00:48:24 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-03-18 00:48:24 +0000
commit056c5b49e1ce93f0aae904cdc9222eb770078681 (patch)
tree87c91a8991075f68c79820e78eb3c72a593bdfea /file.c
parentd01a2ac0727ec6a9825e40a01ee77a216d488b72 (diff)
downloadwireshark-056c5b49e1ce93f0aae904cdc9222eb770078681.tar.gz
Allow custom columns in export as CSV and PSML.
svn path=/trunk/; revision=24683
Diffstat (limited to 'file.c')
-rw-r--r--file.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/file.c b/file.c
index 389cccea63..699729fb8c 100644
--- a/file.c
+++ b/file.c
@@ -2264,9 +2264,12 @@ write_psml_packet(capture_file *cf, frame_data *fdata,
{
FILE *fh = argsp;
epan_dissect_t *edt;
+ gboolean proto_tree_needed;
- /* Fill in the column information, but don't create the protocol tree. */
- edt = epan_dissect_new(FALSE, FALSE);
+ /* Fill in the column information, only create the protocol tree
+ if having custom columns. */
+ proto_tree_needed = have_custom_cols(&cf->cinfo);
+ edt = epan_dissect_new(proto_tree_needed, proto_tree_needed);
epan_dissect_run(edt, pseudo_header, pd, fdata, &cf->cinfo);
epan_dissect_fill_in_columns(edt);
@@ -2335,9 +2338,12 @@ write_csv_packet(capture_file *cf, frame_data *fdata,
{
FILE *fh = argsp;
epan_dissect_t *edt;
+ gboolean proto_tree_needed;
- /* Fill in the column information, but don't create the protocol tree. */
- edt = epan_dissect_new(FALSE, FALSE);
+ /* Fill in the column information, only create the protocol tree
+ if having custom columns. */
+ proto_tree_needed = have_custom_cols(&cf->cinfo);
+ edt = epan_dissect_new(proto_tree_needed, proto_tree_needed);
epan_dissect_run(edt, pseudo_header, pd, fdata, &cf->cinfo);
epan_dissect_fill_in_columns(edt);