aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtse.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2014-10-13 14:04:23 +0200
committerEvan Huus <eapache@gmail.com>2014-10-13 16:01:36 +0000
commit4f37f554f1de15c25e4e11cad7ad1bca55bfa897 (patch)
treefe0d3528b24f597ef728add89b8ea2e50b287cb5 /epan/dissectors/packet-rtse.c
parent748e5228156902290727986eabfbb0d37ef4aa26 (diff)
RTSE: Return dissected length from call_rtse_oid_callback
Change-Id: I6766135ddcdfe25d9bcc060bb2a47376abb36794 Reviewed-on: https://code.wireshark.org/review/4642 Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rtse.c')
-rw-r--r--epan/dissectors/packet-rtse.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c
index fbe377b952..1bd2bca492 100644
--- a/epan/dissectors/packet-rtse.c
+++ b/epan/dissectors/packet-rtse.c
@@ -194,24 +194,23 @@ static int
call_rtse_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data)
{
tvbuff_t *next_tvb;
+ int len;
next_tvb = tvb_new_subset_remaining(tvb, offset);
- if(!dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree, data)){
+
+ if((len = dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree, data)) == 0) {
proto_item *item;
proto_tree *next_tree;
+
next_tree = proto_tree_add_subtree_format(tree, next_tvb, 0, -1, ett_rtse_unknown, &item,
- "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid);
+ "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid);
expert_add_info_format(pinfo, item, &ei_rtse_dissector_oid_not_implemented,
- "RTSE: Dissector for OID %s not implemented", oid);
- dissect_unknown_ber(pinfo, next_tvb, offset, next_tree);
+ "RTSE: Dissector for OID %s not implemented", oid);
+ len = dissect_unknown_ber(pinfo, next_tvb, offset, next_tree);
}
- /*XXX until we change the #.REGISTER signature for _PDU()s
- * into new_dissector_t we have to do this kludge with
- * manually step past the content in the ANY type.
- */
- offset+=tvb_captured_length_remaining(tvb, offset);
+ offset += len;
return offset;
}
@@ -729,7 +728,7 @@ dissect_rtse_RTSE_apdus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
/*--- End of included file: packet-rtse-fn.c ---*/
-#line 187 "../../asn1/rtse/packet-rtse-template.c"
+#line 186 "../../asn1/rtse/packet-rtse-template.c"
/*
* Dissect RTSE PDUs inside a PPDU.
@@ -996,7 +995,7 @@ void proto_register_rtse(void) {
NULL, HFILL }},
/*--- End of included file: packet-rtse-hfarr.c ---*/
-#line 353 "../../asn1/rtse/packet-rtse-template.c"
+#line 352 "../../asn1/rtse/packet-rtse-template.c"
};
/* List of subtrees */
@@ -1018,7 +1017,7 @@ void proto_register_rtse(void) {
&ett_rtse_CallingSSuserReference,
/*--- End of included file: packet-rtse-ettarr.c ---*/
-#line 362 "../../asn1/rtse/packet-rtse-template.c"
+#line 361 "../../asn1/rtse/packet-rtse-template.c"
};
static ei_register_info ei[] = {