'if(proto_... == -1)' not req'd; Don't register ett[] more than once;

svn path=/trunk/; revision=29351
This commit is contained in:
Bill Meier 2009-08-09 15:07:35 +00:00
parent cdb8e2c6b7
commit 0a60e46adf
3 changed files with 25 additions and 50 deletions

View File

@ -307,39 +307,26 @@ void proto_register_mac_mgmt_msg_arq_feedback(void)
}
};
if (proto_mac_mgmt_msg_arq_feedback_decoder == -1)
{
proto_mac_mgmt_msg_arq_feedback_decoder = proto_register_protocol (
"WiMax ARQ Feedback/Discard/Reset Messages", /* name */
"WiMax ARQ Feedback/Discard/Reset (arq)", /* short name */
"wmx.arq" /* abbrev */
);
proto_mac_mgmt_msg_arq_feedback_decoder = proto_register_protocol (
"WiMax ARQ Feedback/Discard/Reset Messages", /* name */
"WiMax ARQ Feedback/Discard/Reset (arq)", /* short name */
"wmx.arq" /* abbrev */
);
proto_register_field_array(proto_mac_mgmt_msg_arq_feedback_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
proto_register_field_array(proto_mac_mgmt_msg_arq_feedback_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
/* Register Wimax Mac Payload Protocol and Dissector */
void proto_register_mac_mgmt_msg_arq_discard(void)
{
if (proto_mac_mgmt_msg_arq_discard_decoder == -1)
{
proto_mac_mgmt_msg_arq_discard_decoder = proto_mac_mgmt_msg_arq_feedback_decoder;
proto_register_subtree_array(ett, array_length(ett));
}
proto_mac_mgmt_msg_arq_discard_decoder = proto_mac_mgmt_msg_arq_feedback_decoder;
}
/* Register Wimax Mac Payload Protocol and Dissector */
void proto_register_mac_mgmt_msg_arq_reset(void)
{
if (proto_mac_mgmt_msg_arq_reset_decoder == -1)
{
proto_mac_mgmt_msg_arq_reset_decoder = proto_mac_mgmt_msg_arq_feedback_decoder;
proto_register_subtree_array(ett, array_length(ett));
}
proto_mac_mgmt_msg_arq_reset_decoder = proto_mac_mgmt_msg_arq_feedback_decoder;
}
/* Decode ARQ-Feedback messages. */

View File

@ -371,26 +371,20 @@ void proto_register_mac_mgmt_msg_dreg_req(void)
}
};
if (proto_mac_mgmt_msg_dreg_req_decoder == -1) {
proto_mac_mgmt_msg_dreg_req_decoder = proto_register_protocol (
"WiMax DREG-REQ/CMD Messages", /* name */
"WiMax DREG-REQ/CMD (dreg)", /* short name */
"wmx.dreg" /* abbrev */
);
proto_mac_mgmt_msg_dreg_req_decoder = proto_register_protocol (
"WiMax DREG-REQ/CMD Messages", /* name */
"WiMax DREG-REQ/CMD (dreg)", /* short name */
"wmx.dreg" /* abbrev */
);
proto_register_field_array(proto_mac_mgmt_msg_dreg_req_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
proto_register_field_array(proto_mac_mgmt_msg_dreg_req_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
/* Register Wimax Mac Payload Protocol and Dissector */
void proto_register_mac_mgmt_msg_dreg_cmd(void)
{
if (proto_mac_mgmt_msg_dreg_cmd_decoder == -1) {
proto_mac_mgmt_msg_dreg_cmd_decoder = proto_mac_mgmt_msg_dreg_req_decoder;
proto_register_subtree_array(ett, array_length(ett));
}
proto_mac_mgmt_msg_dreg_cmd_decoder = proto_mac_mgmt_msg_dreg_req_decoder;
}
/* Decode DREG-REQ messages. */

View File

@ -172,26 +172,20 @@ void proto_register_mac_mgmt_msg_pmc_req(void)
}
};
if (proto_mac_mgmt_msg_pmc_req_decoder == -1) {
proto_mac_mgmt_msg_pmc_req_decoder = proto_register_protocol (
"WiMax PMC-REQ/RSP Messages", /* name */
"WiMax PMC-REQ/RSP (pmc)", /* short name */
"wmx.pmc" /* abbrev */
);
proto_mac_mgmt_msg_pmc_req_decoder = proto_register_protocol (
"WiMax PMC-REQ/RSP Messages", /* name */
"WiMax PMC-REQ/RSP (pmc)", /* short name */
"wmx.pmc" /* abbrev */
);
proto_register_field_array(proto_mac_mgmt_msg_pmc_req_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
proto_register_field_array(proto_mac_mgmt_msg_pmc_req_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
/* Register Wimax Mac Payload Protocol and Dissector */
void proto_register_mac_mgmt_msg_pmc_rsp(void)
{
if (proto_mac_mgmt_msg_pmc_rsp_decoder == -1) {
proto_mac_mgmt_msg_pmc_rsp_decoder = proto_mac_mgmt_msg_pmc_req_decoder;
proto_register_subtree_array(ett, array_length(ett));
}
proto_mac_mgmt_msg_pmc_rsp_decoder = proto_mac_mgmt_msg_pmc_req_decoder;
}
/* Decode PMC-REQ messages. */