diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-09-27 13:38:59 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-09-27 13:38:59 +0000 |
commit | cba210ee93b5026ae90f9ad99fde7c7e28b43c50 (patch) | |
tree | 60eab663e431745281976bf883d74fd5062cc7ea /epan/dissectors/packet-xot.c | |
parent | c12cde57d14bb6fb349560a53641bcb157b94c24 (diff) |
Small cleanup of proto_reg_handoff & etc
- 'once-only' not req'd in some cases
- use find_dissector as appropriate
- remove unneeded code
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26284 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-xot.c')
-rw-r--r-- | epan/dissectors/packet-xot.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/epan/dissectors/packet-xot.c b/epan/dissectors/packet-xot.c index 7e8675c7fd..9bf014b0fc 100644 --- a/epan/dissectors/packet-xot.c +++ b/epan/dissectors/packet-xot.c @@ -51,7 +51,6 @@ #define X25_MBIT_MOD128 0x01 static dissector_handle_t x25_handle; -static dissector_handle_t xot_handle; static gint proto_xot = -1; static gint ett_xot = -1; @@ -303,25 +302,10 @@ proto_register_xot(void) void proto_reg_handoff_xot(void) { - static gboolean initialized = FALSE; - static int currentPort = -1; + dissector_handle_t xot_handle; - if(!initialized) { + xot_handle = find_dissector("xot"); + dissector_add("tcp.port", TCP_PORT_XOT, xot_handle); - /* - * Get a handle for the X.25 dissector. - */ - x25_handle = find_dissector("x.25"); - - xot_handle = new_create_dissector_handle(dissect_xot_tcp_heur, proto_xot); - - initialized = TRUE; - } - - if (currentPort != -1) { - dissector_delete("tcp.port", currentPort, xot_handle); - } - currentPort = TCP_PORT_XOT; - - dissector_add("tcp.port", currentPort, xot_handle); + x25_handle = find_dissector("x.25"); } |