diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-10-15 05:54:33 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-10-15 05:54:33 +0000 |
commit | c2d2988e4f99fc502ef7725c5ce2d818fd72123b (patch) | |
tree | 398809b2332b00d4bab6b126ca70650bc81571d3 | |
parent | abd16b297f4750ea7f74137e87582c64153440f4 (diff) | |
download | wireshark-c2d2988e4f99fc502ef7725c5ce2d818fd72123b.tar.gz wireshark-c2d2988e4f99fc502ef7725c5ce2d818fd72123b.tar.bz2 wireshark-c2d2988e4f99fc502ef7725c5ce2d818fd72123b.zip |
Don't declare functions inside functions - not all C compilers support
that.
svn path=/trunk/; revision=12301
-rw-r--r-- | epan/dissectors/packet-tcap.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c index ec2c764b32..d00dcc0084 100644 --- a/epan/dissectors/packet-tcap.c +++ b/epan/dissectors/packet-tcap.c @@ -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); |