Wireshark-dev: Re: [Wireshark-dev] tshark: export to pdml improvements

From: "Pavel Strnad" <strnadp@xxxxxxxxxx>
Date: Sun, 3 Dec 2017 10:37:57 +0100

Hi Pascal,

I have tried to use Gerrit for review. See https://code.wireshark.org/review/#/c/24681/

Best Regards,

Pavel

 

From: Wireshark-dev [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Pascal Quantin
Sent: Saturday, December 2, 2017 5:28 PM
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] tshark: export to pdml improvements

 

Hi Pavel,

 

Le 2 déc. 2017 16:45, "Pavel Strnad" <strnadp@xxxxxxxxxx> a écrit :

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);
     }
 }

 

Can I convince you to push your patch to Gerrit for review?

 

Best regards,

Pascal.