diff options
Diffstat (limited to 'plugins/unistim/packet-unistim.c')
-rw-r--r-- | plugins/unistim/packet-unistim.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/plugins/unistim/packet-unistim.c b/plugins/unistim/packet-unistim.c index de74ec2837..1db183f081 100644 --- a/plugins/unistim/packet-unistim.c +++ b/plugins/unistim/packet-unistim.c @@ -29,7 +29,6 @@ #include <epan/packet.h> #include <epan/tap.h> #include <epan/expert.h> -#include <epan/prefs.h> #include <epan/dissectors/packet-rtp.h> #include <epan/dissectors/packet-rtcp.h> #include "packet-unistim.h" @@ -45,11 +44,6 @@ void proto_register_unistim(void); -/* Don't set this to 5000 until this dissector is made a heuristic one! - It collides (at least) with tapa. - static guint global_unistim_port = 5000; */ -static guint global_unistim_port = 0; - static unistim_info_t *uinfo; static int unistim_tap = -1; @@ -2692,8 +2686,6 @@ dissect_audio_phone(proto_tree *msg_tree, void proto_register_unistim(void){ - module_t* unistim_module; - static hf_register_info hf[] = { { &hf_unistim_seq_nu, { "RUDP Seq Num","unistim.num",FT_UINT32, @@ -4041,33 +4033,15 @@ proto_register_unistim(void){ expert_register_field_array(expert_unistim, ei, array_length(ei)); unistim_tap = register_tap("unistim"); - - unistim_module = prefs_register_protocol(proto_unistim, proto_reg_handoff_unistim); - - prefs_register_uint_preference(unistim_module, "udp.port", "UNISTIM UDP port", - "UNISTIM port (default 5000)", 10, &global_unistim_port); } void proto_reg_handoff_unistim(void) { - static gboolean initialized = FALSE; - static dissector_handle_t unistim_handle; - static guint unistim_port; - - if (!initialized) { - unistim_handle=create_dissector_handle(dissect_unistim,proto_unistim); - dissector_add_for_decode_as("udp.port", unistim_handle); - initialized=TRUE; - } else { - if (unistim_port != 0) { - dissector_delete_uint("udp.port",unistim_port,unistim_handle); - } - } - if (global_unistim_port != 0) { - dissector_add_uint("udp.port",global_unistim_port,unistim_handle); - } - unistim_port = global_unistim_port; + dissector_handle_t unistim_handle; + + unistim_handle=create_dissector_handle(dissect_unistim,proto_unistim); + dissector_add_for_decode_as_with_preference("udp.port", unistim_handle); } /* |