diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2009-12-31 19:08:59 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2009-12-31 19:08:59 +0000 |
commit | 1fdc2edc999ef30e8e911b7a47194b8f396b897c (patch) | |
tree | 4ce93d4f5fe3d6513c8b10623ccd1098e91bddf9 /print.c | |
parent | 8a9f1e89b94547073011d51a3681bf4edfe1e204 (diff) |
Fix bug #1564: PSML - structure context node missing [when not displaying
packet #1 from the capture file]
This change keeps track of whether the <structure></structure> elements
and information in between have been shown yet, and if not, it shows them
once. The previous behavior would only show it if packet #1 from the
capture file was being shown.
svn path=/trunk/; revision=31395
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -575,9 +575,10 @@ void proto_tree_write_psml(epan_dissect_t *edt, FILE *fh) { gint i; + static gboolean structure_written = FALSE; /* if this is the first packet, we have to create the PSML structure output */ - if(edt->pi.fd->num == 1) { + if(!structure_written) { fprintf(fh, "<structure>\n"); for(i=0; i < edt->pi.cinfo->num_cols; i++) { @@ -587,6 +588,8 @@ proto_tree_write_psml(epan_dissect_t *edt, FILE *fh) } fprintf(fh, "</structure>\n\n"); + + structure_written = TRUE; } fprintf(fh, "<packet>\n"); |