diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-24 18:03:04 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-25 19:21:28 +0000 |
commit | 73e58f025ef111810ae7c931a0262248106095f4 (patch) | |
tree | 881de0049e5e07b573675ef2ec400859e44943ba /asn1/q932 | |
parent | 0cd1a8506425fa379c88df941e3039ce9a1164d4 (diff) |
create_dissector_handle -> new_create_dissector_handle for ASN.1 dissectors
Change-Id: I3d7a61a5ddd79b7bcbec5b9c515470848f413fd5
Reviewed-on: https://code.wireshark.org/review/12121
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'asn1/q932')
-rw-r--r-- | asn1/q932/packet-q932-template.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/asn1/q932/packet-q932-template.c b/asn1/q932/packet-q932-template.c index 55bc31c08d..74cf8b4594 100644 --- a/asn1/q932/packet-q932-template.c +++ b/asn1/q932/packet-q932-template.c @@ -243,8 +243,8 @@ dissect_q932_ni_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr } /*--- dissect_q932_ie -------------------------------------------------------*/ -static void -dissect_q932_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { +static int +dissect_q932_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { gint offset; proto_item *ti; proto_tree *ie_tree; @@ -265,7 +265,7 @@ dissect_q932_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_item(ie_tree, hf_q932_ie_len, tvb, offset + 1, 1, ENC_BIG_ENDIAN); offset += 2; if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return offset; switch (ie_type) { case Q932_IE_FACILITY : dissect_q932_facility_ie(tvb, offset, pinfo, ie_tree, ie_len); @@ -278,6 +278,7 @@ dissect_q932_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_item(ie_tree, hf_q932_ie_data, tvb, offset, ie_len, ENC_NA); } } + return tvb_captured_length(tvb); } /*--- dissect_q932_apdu -----------------------------------------------------*/ @@ -372,7 +373,7 @@ void proto_reg_handoff_q932(void) { static gboolean q931_prefs_initialized = FALSE; if (!q931_prefs_initialized) { - q932_ie_handle = create_dissector_handle(dissect_q932_ie, proto_q932); + q932_ie_handle = new_create_dissector_handle(dissect_q932_ie, proto_q932); /* Facility */ dissector_add_uint("q931.ie", (0x00 << 8) | Q932_IE_FACILITY, q932_ie_handle); /* Notification indicator */ |