diff options
Diffstat (limited to 'asn1/tcap/packet-tcap-template.c')
-rw-r--r-- | asn1/tcap/packet-tcap-template.c | 19 |
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; |