aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-icep.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-icep.c')
-rw-r--r--epan/dissectors/packet-icep.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/epan/dissectors/packet-icep.c b/epan/dissectors/packet-icep.c
index 5bb16fe117..fe9344f1b7 100644
--- a/epan/dissectors/packet-icep.c
+++ b/epan/dissectors/packet-icep.c
@@ -124,7 +124,6 @@ static expert_field ei_icep_context_too_long = EI_INIT;
static guint icep_max_batch_requests = 64;
static guint icep_max_ice_string_len = 512;
static guint icep_max_ice_context_pairs = 64;
-static guint icep_tcp_port = 0;
static guint icep_udp_port = 0;
@@ -1295,13 +1294,6 @@ void proto_register_icep(void)
expert_register_field_array(expert_icep, ei, array_length(ei));
icep_module = prefs_register_protocol(proto_icep, NULL);
-
- prefs_register_uint_preference(icep_module, "tcp.port",
- "ICEP TCP Port",
- "ICEP TCP port",
- 10,
- &icep_tcp_port);
-
prefs_register_uint_preference(icep_module, "udp.port",
"ICEP UDP Port",
"ICEP UDP port",
@@ -1329,7 +1321,6 @@ void proto_reg_handoff_icep(void)
{
static gboolean icep_prefs_initialized = FALSE;
static dissector_handle_t icep_tcp_handle, icep_udp_handle;
- static guint old_icep_tcp_port = 0;
static guint old_icep_udp_port = 0;
/* Register as a heuristic TCP/UDP dissector */
@@ -1340,20 +1331,12 @@ void proto_reg_handoff_icep(void)
heur_dissector_add("tcp", dissect_icep_tcp, "ICEP over TCP", "icep_tcp", proto_icep, HEURISTIC_ENABLE);
heur_dissector_add("udp", dissect_icep_udp, "ICEP over UDP", "icep_udp", proto_icep, HEURISTIC_ENABLE);
- icep_prefs_initialized = TRUE;
- }
+ /* Register TCP port for dissection */
+ dissector_add_for_decode_as_with_preference("tcp.port", icep_tcp_handle);
- /* Register TCP port for dissection */
- if(old_icep_tcp_port != 0 && old_icep_tcp_port != icep_tcp_port){
- dissector_delete_uint("tcp.port", old_icep_tcp_port, icep_tcp_handle);
- }
-
- if(icep_tcp_port != 0 && old_icep_tcp_port != icep_tcp_port) {
- dissector_add_uint("tcp.port", icep_tcp_port, icep_tcp_handle);
+ icep_prefs_initialized = TRUE;
}
- old_icep_tcp_port = icep_tcp_port;
-
/* Register UDP port for dissection */
if(old_icep_udp_port != 0 && old_icep_udp_port != icep_udp_port){
dissector_delete_uint("udp.port", old_icep_udp_port, icep_udp_handle);