Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Disabling a dissector doesn't seem to quite work.

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Mon, 17 Sep 2012 16:38:08 -0400
Bill Meier wrote:
On 9/15/2012 4:35 PM, Evan Huus wrote:

The obvious solution for now is to remove the comments that are
getting falsely picked up as function definitions, but the better fix
is to the make-dissector-reg scripts. Is it valid for there to be two
register functions in a file, or could the scripts simply limit to one
entry per file? Or someone who groks the regexes could fix them to
ignore lines that are commented out...



See checkAPIs.pl for a regex & code which removes all the comments from a .c file before doing various checks...

To use those regexp's (or something like them) make-dissector-reg.py would need to be changed to read the whole file in as one big string (like checkAPIs.pl does); currently make-dissector-reg.py reads the files line-by-line.

Another quick way to avoid the problem is to unique-ify the lists as we sort them; r44952 does that.