Wireshark-commits: [Wireshark-commits] master fda0baf: Ensure our fields are registered before star
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=fda0bafeb842f77059bce6aa3aa5cabd04f8457d
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
fda0baf by Jeff Morriss (jeff.morriss.ws@xxxxxxxxx):
Ensure our fields are registered before starting dissection--even when !tree.
(The check to ensure the delayed field registration had been done was still
wrapped inside an if(tree) but a bunch of proto_add_*()'s had been pulled out
from under if(tree)'s thus causing some hf's to be used before registered.)
Also simplify the code to ensure the fields are registered since we're doing it
potentially many times per frame: do an integer comparison rather than looking
up an hf by name.
Add a note to the docs for proto_register_prefix() to make it clear that the
initializer routine may not be called before the dissector is asked to dissect
something.
Change-Id: I5dc1154638a290c3a94149184d56570c3abb836a
Reviewed-on: https://code.wireshark.org/review/14711
Petri-Dish: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
Actions performed:
from d81fe39 Correct 6LoWPAN NHC datagram size calculations
adds fda0baf Ensure our fields are registered before starting dissection--even when !tree.
Summary of changes:
epan/dissectors/packet-radius.c | 24 +++++++++++-------------
epan/proto.h | 3 +++
2 files changed, 14 insertions(+), 13 deletions(-)