Wireshark-commits: [Wireshark-commits] master 71268f8b: Apply port preferences during dissector han
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=71268f8bd1458048e2d75f5a3b8bc94feb3b7d0c
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
71268f8b by Jaap Keuter (jaap.keuter@xxxxxxxxx):
Apply port preferences during dissector handoff registration
Handling of preferences is often done in the dissector handoff
registration. Therefore this function is often registered as
callback while registering preference handling for the module.
In this way the preferences are processed both when registering
the dissector and when changes happen.
Some dissectors opt to register a seperate callback function to
be called when preferences change. Now these have to be called
from the dissector handoff function explicitly, in order to have
the preferences processed during dissector registration.
This becomes explicitly apparent when the port registration comes
into play. With the migration to using dissector registration on
ports with preference this port (range) is often retrieved from
the preferences to match against the ports in a packet to determine
an incoming or outgoing packet of a server. In case the callback
function is not called from the dissector registration this
determination fails, until the preferences are applied/changed,
causing the preference handling callback to be called.
This change add the calling of the callback during dissector
registration, fixing some dissector port registrations in the
process.
Change-Id: Ieaea7f63f8f9062c56582a042a3a5a862e286406
Signed-off-by: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Reviewed-on: https://code.wireshark.org/review/30848
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from c66fbf4 Re-balance DINDENT/DENDENT macros in conversation.c.
add 71268f8b Apply port preferences during dissector handoff registration
Summary of changes:
epan/dissectors/packet-beep.c | 1 +
epan/dissectors/packet-capwap.c | 1 +
epan/dissectors/packet-epl.c | 1 +
epan/dissectors/packet-gopher.c | 6 ++----
epan/dissectors/packet-hdfs.c | 1 +
epan/dissectors/packet-iec104.c | 1 +
epan/dissectors/packet-kafka.c | 1 +
epan/dissectors/packet-mbtcp.c | 2 ++
epan/dissectors/packet-quake2.c | 3 ++-
epan/dissectors/packet-quakeworld.c | 3 ++-
epan/dissectors/packet-rsync.c | 1 +
epan/dissectors/packet-s5066dts.c | 1 +
epan/dissectors/packet-tds.c | 1 +
epan/dissectors/packet-tftp.c | 1 +
epan/dissectors/packet-uaudp.c | 1 +
15 files changed, 19 insertions(+), 6 deletions(-)