summaryrefslogtreecommitdiff
path: root/asn1/sv
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-08-08 09:19:29 -0400
committerMichael Mann <mmann78@netscape.net>2014-08-09 01:57:08 +0000
commitcd02af56a1e39c66b44fd7957aff3b7b77a59e9d (patch)
tree4a3e859751bb73268115a607e9dffcec008bb411 /asn1/sv
parentbb15274a4a82fcab1c06935fa1e249f436420a02 (diff)
downloadwireshark-cd02af56a1e39c66b44fd7957aff3b7b77a59e9d.tar.gz
Eliminate (almost all) proto_tree_add_text calls from ASN.1 dissectors.
This mostly involved adding expert info capabilities to many of the dissectors so that they could correctly flag error conditions. Only remaining proto_tree_add_text calls are in H248.cnf, which has a convoluted way of using hf_ data to make its tree. Change-Id: I6412150c2ec1977d7fa38f3f0ed416680bdfb141 Reviewed-on: https://code.wireshark.org/review/3500 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'asn1/sv')
-rw-r--r--asn1/sv/packet-sv-template.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/asn1/sv/packet-sv-template.c b/asn1/sv/packet-sv-template.c
index 2af3318772..877034e6ab 100644
--- a/asn1/sv/packet-sv-template.c
+++ b/asn1/sv/packet-sv-template.c
@@ -108,6 +108,7 @@ static int ett_phsmeas_q = -1;
#include "packet-sv-ett.c"
static expert_field ei_sv_mal_utctime = EI_INIT;
+static expert_field ei_sv_zero_pdu = EI_INIT;
#if 0
static const value_string sv_q_validity_vals[] = {
@@ -228,7 +229,7 @@ dissect_sv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
old_offset = offset;
offset = dissect_sv_SampledValues(FALSE, tvb, offset, &asn1_ctx , tree, -1);
if (offset == old_offset) {
- proto_tree_add_text(tree, tvb, offset, -1, "Internal error, zero-byte SV PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_sv_zero_pdu, tvb, offset, -1);
break;
}
}
@@ -314,6 +315,7 @@ void proto_register_sv(void) {
static ei_register_info ei[] = {
{ &ei_sv_mal_utctime, { "sv.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding", EXPFILL }},
+ { &ei_sv_zero_pdu, { "sv.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte SV PDU", EXPFILL }},
};
expert_module_t* expert_sv;