Don't declare functions inside functions - not all C compilers support
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 15 Oct 2004 05:54:33 +0000 (05:54 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 15 Oct 2004 05:54:33 +0000 (05:54 +0000)
that.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12301 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-tcap.c

index ec2c764b32da3128b58a2333e93db6c33d9ad2bf..d00dcc0084ad966e871205d5a1b924638ebcc58f 100644 (file)
@@ -70,6 +70,8 @@ Tcap_Standard_Type tcap_standard = ITU_TCAP_STANDARD;
 static range_t global_ssn_range;
 static range_t ssn_range;
 
+static dissector_handle_t tcap_handle;
+
 /* saved pinfo */
 static packet_info *g_pinfo = NULL;
 static proto_tree *g_tcap_tree = NULL;
@@ -2880,27 +2882,28 @@ proto_register_tcap(void)
    This format is required because a script is used to find these routines and
    create the code that calls these routines.
 */
+
+static void range_delete_callback(guint32 ssn)
+{
+    if (ssn) {
+       dissector_delete("sccp.ssn", ssn, tcap_handle);
+       dissector_delete("sua.ssn", ssn, tcap_handle);
+    }
+}
+
+static void range_add_callback(guint32 ssn)
+{
+    if (ssn) {
+       dissector_add("sccp.ssn", ssn, tcap_handle);
+       dissector_add("sua.ssn", ssn, tcap_handle);
+    }
+}
+
 void
 proto_reg_handoff_tcap(void)
 {
-    static dissector_handle_t tcap_handle;
     static gboolean prefs_initialized = FALSE;
 
-    static void range_delete_callback(guint32 ssn)
-    {
-       if (ssn) {
-           dissector_delete("sccp.ssn", ssn, tcap_handle);
-           dissector_delete("sua.ssn", ssn, tcap_handle);
-       }
-    }
-    static void range_add_callback(guint32 ssn)
-    {
-       if (ssn) {
-           dissector_add("sccp.ssn", ssn, tcap_handle);
-           dissector_add("sua.ssn", ssn, tcap_handle);
-       }
-    }
-
     if (!prefs_initialized) {
 
        tcap_handle = create_dissector_handle(dissect_tcap, proto_tcap);