Wireshark mailing list archives

Re: Reverting proto_tree_reset()


From: Anders Broman <anders.broman () ericsson com>
Date: Wed, 31 Oct 2012 11:37:03 +0000

 

-----Original Message-----
From: wireshark-dev-bounces () wireshark org [mailto:wireshark-dev-bounces () wireshark org] On Behalf Of Jakub 
Zawadzki
Sent: den 31 oktober 2012 11:43
To: wireshark-dev () wireshark org
Subject: [Wireshark-dev] Reverting proto_tree_reset()

Hi,

in r45669 I added two new functions: epan_dissect_reset, proto_tree_reset.

In BTS we have got bug #2047[1] which is something simillar, but:

1/ IMHO it has minimal impact for speed, and this functions duplicates some code.

2/ major thing for me was to make referencing (HF_REF_TYPE_DIRECT), 
   and unreferencing (HF_REF_TYPE_NONE) hfinfo->ref_type multi-thread dissection safe.


But achieving #2 can be done with some simpler code, rename dfilter_prime_proto_tree to dfilter_prime() + 
remove tree argument, and use new function after compiling dfilter and *before* dissection loops.

Create new function dfilter_unprime() which unreference hfs, and call this funcion *after* dissection loop.


last point, r45669 is buggy, it never set hfi->ref_type back to HF_REF_TYPE_NONE.


So, I'll probably revert r45669, and fix it like I described above, I can prepare patch if anyone want to do 
review?

Dunno what to do with bug #2047 WONTFIX? Anders?

[1] https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2047

The code has changed to much since this patch was created and it was part of a
large set of patches not made by me. Closing as WONTFIX as suggested :-)

Regards
Anders
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: