diff options
Diffstat (limited to 'epan/dissectors/packet-megaco.c')
-rw-r--r-- | epan/dissectors/packet-megaco.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c index 62886c2ee0..96c96017cc 100644 --- a/epan/dissectors/packet-megaco.c +++ b/epan/dissectors/packet-megaco.c @@ -189,7 +189,6 @@ static ws_mempbrk_pattern pbrk_braces; * decode. */ static guint global_megaco_txt_sctp_port = PORT_MEGACO_TXT; -static guint global_megaco_txt_tcp_port = PORT_MEGACO_TXT; static guint global_megaco_txt_udp_port = PORT_MEGACO_TXT; #if 0 static guint global_megaco_bin_sctp_port = PORT_MEGACO_BIN; @@ -3775,8 +3774,7 @@ proto_register_megaco(void) module_t *megaco_module; expert_module_t* expert_megaco; - proto_megaco = proto_register_protocol("MEGACO", - "MEGACO", "megaco"); + proto_megaco = proto_register_protocol("MEGACO", "MEGACO", "megaco"); register_dissector("megaco", dissect_megaco_text, proto_megaco); @@ -3794,11 +3792,6 @@ proto_register_megaco(void) "Set the SCTP port for MEGACO text messages", 10, &global_megaco_txt_sctp_port); - prefs_register_uint_preference(megaco_module, "tcp.txt_port", - "MEGACO Text TCP Port", - "Set the TCP port for MEGACO text messages", - 10, &global_megaco_txt_tcp_port); - prefs_register_uint_preference(megaco_module, "udp.txt_port", "MEGACO Text UDP Port", "Set the UDP port for MEGACO text messages", @@ -3863,7 +3856,6 @@ proto_reg_handoff_megaco(void) * the user changes port from the gui. */ static guint txt_sctp_port; - static guint txt_tcp_port; static guint txt_udp_port; #if 0 static guint bin_sctp_port; @@ -3881,23 +3873,21 @@ proto_reg_handoff_megaco(void) megaco_text_handle = find_dissector("megaco"); megaco_text_tcp_handle = create_dissector_handle(dissect_megaco_text_tcp, proto_megaco); + dissector_add_uint_with_preference("tcp.port", PORT_MEGACO_TXT, megaco_text_tcp_handle); dissector_add_uint("sctp.ppi", H248_PAYLOAD_PROTOCOL_ID, megaco_text_handle); megaco_prefs_initialized = TRUE; } else { dissector_delete_uint("sctp.port", txt_sctp_port, megaco_text_handle); - dissector_delete_uint("tcp.port", txt_tcp_port, megaco_text_tcp_handle); dissector_delete_uint("udp.port", txt_udp_port, megaco_text_handle); } /* Set our port number for future use */ txt_sctp_port = global_megaco_txt_sctp_port; - txt_tcp_port = global_megaco_txt_tcp_port; txt_udp_port = global_megaco_txt_udp_port; dissector_add_uint("sctp.port", global_megaco_txt_sctp_port, megaco_text_handle); - dissector_add_uint("tcp.port", global_megaco_txt_tcp_port, megaco_text_tcp_handle); dissector_add_uint("udp.port", global_megaco_txt_udp_port, megaco_text_handle); exported_pdu_tap = find_tap_id(EXPORT_PDU_TAP_NAME_LAYER_7); |