aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/tcap
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-21 22:03:26 -0500
committerAnders Broman <a.broman58@gmail.com>2015-11-22 08:38:50 +0000
commitbcabd8df0f3d527d81ed7bc2ee4717ae225733bd (patch)
treec845dfe3c3ad2186910971f3fe27bda627ba10be /asn1/tcap
parentf9f88ff226835367972a1ceaf97b3c6d8844e330 (diff)
register_dissector -> new_register_dissector for ASN.1 dissectors.
Change-Id: I0476519c02ffdd426b4fdfe8a206d61b728c327a Reviewed-on: https://code.wireshark.org/review/12026 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1/tcap')
-rw-r--r--asn1/tcap/packet-tcap-template.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/asn1/tcap/packet-tcap-template.c b/asn1/tcap/packet-tcap-template.c
index 83e5b6a991..1c43262cb7 100644
--- a/asn1/tcap/packet-tcap-template.c
+++ b/asn1/tcap/packet-tcap-template.c
@@ -121,8 +121,6 @@ static int dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tv
static GHashTable* ansi_sub_dissectors = NULL;
static GHashTable* itu_sub_dissectors = NULL;
-static void dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree);
-
extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) {
g_hash_table_insert(ansi_sub_dissectors,GUINT_TO_POINTER(ssn),dissector);
dissector_add_uint("sccp.ssn",ssn,tcap_handle);
@@ -1966,8 +1964,8 @@ const value_string tcap_component_type_str[] = {
{ 0, NULL }
};
-static void
-dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
+static int
+dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
{
proto_item *item=NULL;
proto_tree *tree=NULL;
@@ -2003,12 +2001,10 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
case 5:
case 6:
case 22:
- call_dissector(ansi_tcap_handle, tvb, pinfo, parent_tree);
- return;
- break;
+ return call_dissector(ansi_tcap_handle, tvb, pinfo, parent_tree);
default:
- return;
+ return tvb_captured_length(tvb);
}
}
@@ -2057,6 +2053,7 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
(p_tcap_context->callback)(tvb, pinfo, tcap_stat_tree, p_tcap_context);
}
}
+ return tvb_captured_length(tvb);
}
void
@@ -2217,9 +2214,9 @@ proto_register_tcap(void)
itu_sub_dissectors = g_hash_table_new(g_direct_hash,g_direct_equal);
/* 'globally' register dissector */
- register_dissector("tcap", dissect_tcap, proto_tcap);
+ new_register_dissector("tcap", dissect_tcap, proto_tcap);
- tcap_handle = create_dissector_handle(dissect_tcap, proto_tcap);
+ tcap_handle = new_create_dissector_handle(dissect_tcap, proto_tcap);
register_init_routine(&init_tcap);
register_cleanup_routine(&cleanup_tcap);
@@ -2474,7 +2471,7 @@ call_tcap_dissector(dissector_handle_t handle, tvbuff_t* tvb, packet_info* pinfo
requested_subdissector_handle = handle;
TRY {
- dissect_tcap(tvb, pinfo, tree);
+ dissect_tcap(tvb, pinfo, tree, NULL);
} CATCH_ALL {
requested_subdissector_handle = NULL;
RETHROW;