aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mgcp.c
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2008-09-03 16:42:35 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2008-09-03 16:42:35 +0000
commit01a4e1d9c59251982787425f8e2f588a47fa2d6e (patch)
tree0cba41be21c97f7851f13844ce71399d7be20e97 /epan/dissectors/packet-mgcp.c
parent8c061b3ab4d47419051815dcb1264936b4440501 (diff)
Cleanup related to prefs & proto_reg_handoff
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26128 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-mgcp.c')
-rw-r--r--epan/dissectors/packet-mgcp.c23
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;