diff options
Diffstat (limited to 'asn1/c1222/packet-c1222-template.c')
-rw-r--r-- | asn1/c1222/packet-c1222-template.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/asn1/c1222/packet-c1222-template.c b/asn1/c1222/packet-c1222-template.c index 022b255108..6f6b76f378 100644 --- a/asn1/c1222/packet-c1222-template.c +++ b/asn1/c1222/packet-c1222-template.c @@ -1056,8 +1056,8 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_ * \param pinfo the packet info of the current data * \param tree the tree to append this item to */ -static void -dissect_c1222_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_c1222_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *c1222_item = NULL; proto_tree *c1222_tree = NULL; @@ -1071,6 +1071,8 @@ dissect_c1222_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) c1222_tree = proto_item_add_subtree(c1222_item, ett_c1222); dissect_MESSAGE_PDU(tvb, pinfo, c1222_tree); } + + return tvb_length(tvb); } /** @@ -1101,11 +1103,12 @@ get_c1222_message_len(packet_info *pinfo, tvbuff_t *tvb, int offset) * \param pinfo the packet info of the current data * \param tree the tree to append this item to */ -static void -dissect_c1222(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_c1222(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, c1222_desegment, 5, - get_c1222_message_len, dissect_c1222_common); + get_c1222_message_len, dissect_c1222_common, data); + return tvb_length(tvb); } /*--- proto_register_c1222 -------------------------------------------*/ @@ -1420,8 +1423,8 @@ proto_reg_handoff_c1222(void) guint8 *temp = NULL; if( !initialized ) { - c1222_handle = create_dissector_handle(dissect_c1222, proto_c1222); - c1222_udp_handle = create_dissector_handle(dissect_c1222_common, proto_c1222); + c1222_handle = new_create_dissector_handle(dissect_c1222, proto_c1222); + c1222_udp_handle = new_create_dissector_handle(dissect_c1222_common, proto_c1222); dissector_add_uint("tcp.port", global_c1222_port, c1222_handle); dissector_add_uint("udp.port", global_c1222_port, c1222_udp_handle); initialized = TRUE; |