Wireshark-dev: [Wireshark-dev] tshark: export to pdml improvements
From: "Pavel Strnad" <strnadp@xxxxxxxxxx>
Date: Sat, 2 Dec 2017 16:44:55 +0100
Hi list,
I am proposing following pdml export improvements:
1) fix for bug introduced in 2.4 in SHA-1:b8ead953758304 where level
incrementing was missed in the fake protocol wrapper and due to that level
is getting negative for LUA cases

2) improve indentation for Close off fake wrapper protocol that was till now
missing required indentation in LUA cases

patch fixing that in the master branch:

diff --git a/epan/print.c b/epan/print.c index 90648fe04a..a37a761469 100644
--- a/epan/print.c
+++ b/epan/print.c
@@ -489,7 +489,7 @@ proto_tree_write_node_pdml(proto_node *node, gpointer
data)
     if (wrap_in_fake_protocol) {
         /* Open fake protocol wrapper */
         fputs("<proto name=\"fake-field-wrapper\">\n", pdata->fh);
-
+        pdata->level++;
         print_indent(pdata->level + 1, pdata->fh);
     }
 
@@ -716,6 +716,7 @@ proto_tree_write_node_pdml(proto_node *node, gpointer
data)
 
     /* Close off fake wrapper protocol */
     if (wrap_in_fake_protocol) {
+        print_indent(pdata->level + 1, pdata->fh);
         fputs("</proto>\n", pdata->fh);
     }
 }

Best Regards,
Pavel