aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2008-01-12 00:34:17 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2008-01-12 00:34:17 +0000
commit432354c001d931ad69e2094030472dad7d640492 (patch)
treec9cbd3ce570814789d1b9931c83f64e63929d246 /print.c
parent01df06d697bd1d973f1b14767032c239af495c18 (diff)
Don't write closing PDML tag for Data protocol - it uses simple (self-closing) tags.
Fixes bug 2185. svn path=/trunk/; revision=24069
Diffstat (limited to 'print.c')
-rw-r--r--print.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/print.c b/print.c
index 9b39dd07e9..926e05801a 100644
--- a/print.c
+++ b/print.c
@@ -425,11 +425,13 @@ proto_tree_write_node_pdml(proto_node *node, gpointer data)
for (i = -1; i < pdata->level; i++) {
fputs(" ", pdata->fh);
}
- if (fi->hfinfo->type == FT_PROTOCOL) {
- fputs("</proto>\n", pdata->fh);
- }
- else {
- fputs("</field>\n", pdata->fh);
+ if (fi->hfinfo->id != proto_data) { /* Data protocol uses simple tags */
+ if (fi->hfinfo->type == FT_PROTOCOL) {
+ fputs("</proto>\n", pdata->fh);
+ }
+ else {
+ fputs("</field>\n", pdata->fh);
+ }
}
}
}