diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-03-18 00:48:24 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-03-18 00:48:24 +0000 |
commit | 056c5b49e1ce93f0aae904cdc9222eb770078681 (patch) | |
tree | 87c91a8991075f68c79820e78eb3c72a593bdfea /file.c | |
parent | d01a2ac0727ec6a9825e40a01ee77a216d488b72 (diff) | |
download | wireshark-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.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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); |