diff options
author | Bill Meier <wmeier@newsguy.com> | 2008-09-03 16:42:35 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2008-09-03 16:42:35 +0000 |
commit | 419e3a47f6a9c887edc949235dc0755a98d4c4ee (patch) | |
tree | 0cba41be21c97f7851f13844ce71399d7be20e97 /epan/dissectors/packet-mgcp.c | |
parent | af49f0161686d18f45b749d96eaf431ce45625d0 (diff) |
Cleanup related to prefs & proto_reg_handoff
svn path=/trunk/; revision=26128
Diffstat (limited to 'epan/dissectors/packet-mgcp.c')
-rw-r--r-- | epan/dissectors/packet-mgcp.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c index 8c564c9246..5cde55eb60 100644 --- a/epan/dissectors/packet-mgcp.c +++ b/epan/dissectors/packet-mgcp.c @@ -254,15 +254,6 @@ static guint global_mgcp_callagent_udp_port = UDP_PORT_MGCP_CALLAGENT; static gboolean global_mgcp_raw_text = FALSE; static gboolean global_mgcp_message_count = FALSE; -/* - * Variables to allow for proper deletion of dissector registration when - * the user changes port from the gui. - */ -static int gateway_tcp_port = 0; -static int gateway_udp_port = 0; -static int callagent_tcp_port = 0; -static int callagent_udp_port = 0; - /* Some basic utility functions that are specific to this dissector */ static gboolean is_mgcp_verb(tvbuff_t *tvb, gint offset, gint maxlength, const gchar **verb_name); static gboolean is_mgcp_rspcode(tvbuff_t *tvb, gint offset, gint maxlength); @@ -949,13 +940,21 @@ void proto_register_mgcp(void) /* The registration hand-off routine */ void proto_reg_handoff_mgcp(void) { - static int mgcp_prefs_initialized = FALSE; + static gboolean mgcp_prefs_initialized = FALSE; static dissector_handle_t mgcp_tpkt_handle; - /* Get a handle for the SDP dissector. */ - sdp_handle = find_dissector("sdp"); + /* + * Variables to allow for proper deletion of dissector registration when + * the user changes port from the gui. + */ + static int gateway_tcp_port; + static int gateway_udp_port; + static int callagent_tcp_port; + static int callagent_udp_port; if (!mgcp_prefs_initialized) { + /* Get a handle for the SDP dissector. */ + sdp_handle = find_dissector("sdp"); mgcp_handle = new_create_dissector_handle(dissect_mgcp, proto_mgcp); mgcp_tpkt_handle = new_create_dissector_handle(dissect_tpkt_mgcp, proto_mgcp); mgcp_prefs_initialized = TRUE; |