aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-01-11 00:47:38 -0800
committerGuy Harris <guy@alum.mit.edu>2018-01-11 08:48:18 +0000
commit3d38b87d86736a976dd28f03b989282e093191bb (patch)
tree15b12ccde9c685f7345e7e384dcc80713a0a4cfd
parent93ea677ec4bc61966966cc71a67bbbca4125d607 (diff)
Fix registration.
Some routines are registered by the standard plugin mechanism, others are registered internally. If a first-stage ("register") routine is registered internally, we must register the second-stage ("reg_handoff") routine internally as well, otherwise the second-stage routine isn't recognized by tools/make-plugin-reg.py and is never called. Bug: 14322 Change-Id: I6eb94c0b74b6fb4d60eb57113d4ada73f4240150 Reviewed-on: https://code.wireshark.org/review/25256 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--plugins/wimax/mac_hd_generic_decoder.c2
-rw-r--r--plugins/wimax/packet-wmx.c12
-rw-r--r--plugins/wimax/wimax-int.h3
-rw-r--r--plugins/wimax/wimax_pdu_decoder.c2
4 files changed, 17 insertions, 2 deletions
diff --git a/plugins/wimax/mac_hd_generic_decoder.c b/plugins/wimax/mac_hd_generic_decoder.c
index 55f5a8a137..168f1458bd 100644
--- a/plugins/wimax/mac_hd_generic_decoder.c
+++ b/plugins/wimax/mac_hd_generic_decoder.c
@@ -2292,7 +2292,7 @@ void wimax_proto_register_mac_header_generic(void)
}
void
-proto_reg_handoff_mac_header_generic(void)
+wimax_proto_reg_handoff_mac_header_generic(void)
{
mac_mgmt_msg_decoder_handle = find_dissector("wmx_mac_mgmt_msg_decoder");
mac_ip_handle = find_dissector("ip");
diff --git a/plugins/wimax/packet-wmx.c b/plugins/wimax/packet-wmx.c
index 89aded3a99..1cdbd97e82 100644
--- a/plugins/wimax/packet-wmx.c
+++ b/plugins/wimax/packet-wmx.c
@@ -352,6 +352,18 @@ void proto_register_wimax(void)
}
/*
+ * If we're going to give the register routines for the above files special
+ * names to ensure that they're called in the above order in the above
+ * routine, we have to do the same with their handoff routines, if they
+ * have any - that's the way the registration generation stuff now works.
+ */
+void proto_reg_handoff_wimax(void)
+{
+ wimax_proto_reg_handoff_wimax_pdu();
+ wimax_proto_reg_handoff_mac_header_generic();
+}
+
+/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
diff --git a/plugins/wimax/wimax-int.h b/plugins/wimax/wimax-int.h
index 6d8333a785..c22c1dd14b 100644
--- a/plugins/wimax/wimax-int.h
+++ b/plugins/wimax/wimax-int.h
@@ -36,4 +36,7 @@ void wimax_proto_register_mac_header_generic(void);
void wimax_proto_register_mac_header_type_1(void);
void wimax_proto_register_mac_header_type_2(void);
+void wimax_proto_reg_handoff_wimax_pdu(void);
+void wimax_proto_reg_handoff_mac_header_generic(void);
+
#endif
diff --git a/plugins/wimax/wimax_pdu_decoder.c b/plugins/wimax/wimax_pdu_decoder.c
index a9f097fc1e..d17b46288f 100644
--- a/plugins/wimax/wimax_pdu_decoder.c
+++ b/plugins/wimax/wimax_pdu_decoder.c
@@ -245,7 +245,7 @@ void wimax_proto_register_wimax_pdu(void)
}
void
-proto_reg_handoff_wimax_pdu(void)
+wimax_proto_reg_handoff_wimax_pdu(void)
{
mac_generic_decoder_handle = find_dissector("mac_header_generic_handler");
mac_header_type1_handle = find_dissector("mac_header_type_1_handler");