diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-01-13 02:16:04 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-01-13 11:36:29 +0000 |
commit | bf0f5a982bc0666b6fa8d70c8d64cb1f07ab12ad (patch) | |
tree | 1a6adb34aa0b0b7b59e5f1f2fedfda9014e9769d /epan/dissectors/packet-mgcp.c | |
parent | 4f4769adf626ec2601e3488efbc2e2d57d55762c (diff) |
Use result of register_dissector
Assign result of `register_dissector(..., func, proto)` to FOO_handle
and remove `FOO_handle = create_dissector_handle(func, proto)`.
Found by looking for files named packet-FOO.c having the above
create_dissector_handle pattern. Some files (with different dissect
routines for the two functions) remain unchanged.
Change-Id: Ifbed8202c6dbc63a1dae9acc03313980ffbbbb90
Reviewed-on: https://code.wireshark.org/review/13247
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mgcp.c')
-rw-r--r-- | epan/dissectors/packet-mgcp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c index d9b5d0e9c7..ea8d5a9aa4 100644 --- a/epan/dissectors/packet-mgcp.c +++ b/epan/dissectors/packet-mgcp.c @@ -2308,7 +2308,7 @@ void proto_register_mgcp(void) register_init_routine(&mgcp_init_protocol); register_cleanup_routine(&mgcp_cleanup_protocol); - register_dissector("mgcp", dissect_mgcp, proto_mgcp); + mgcp_handle = register_dissector("mgcp", dissect_mgcp, proto_mgcp); /* Register our configuration options */ mgcp_module = prefs_register_protocol(proto_mgcp, proto_reg_handoff_mgcp); @@ -2377,7 +2377,6 @@ void proto_reg_handoff_mgcp(void) { /* Get a handle for the SDP dissector. */ sdp_handle = find_dissector("sdp"); - mgcp_handle = create_dissector_handle(dissect_mgcp, proto_mgcp); mgcp_tpkt_handle = create_dissector_handle(dissect_tpkt_mgcp, proto_mgcp); mgcp_prefs_initialized = TRUE; } |