diff options
author | Michael Mann <mmann78@netscape.net> | 2014-08-08 09:19:29 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-08-09 01:57:08 +0000 |
commit | cd02af56a1e39c66b44fd7957aff3b7b77a59e9d (patch) | |
tree | 4a3e859751bb73268115a607e9dffcec008bb411 /asn1/h225/h225.cnf | |
parent | bb15274a4a82fcab1c06935fa1e249f436420a02 (diff) |
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/h225/h225.cnf')
-rw-r--r-- | asn1/h225/h225.cnf | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf index 2bece14afe..b34a6dee49 100644 --- a/asn1/h225/h225.cnf +++ b/asn1/h225/h225.cnf @@ -666,12 +666,13 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode #.FN_HDR GenericIdentifier gef_ctx_t *gefx; + proto_item* ti; #.FN_FTR gef_ctx_update_key(gef_ctx_get(actx->private_data)); - /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG GenericIdentifier: %s", gef_ctx_get(actx->private_data)->key);*/ gefx = gef_ctx_get(actx->private_data); if (gefx) { - /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ + ti = proto_tree_add_string(tree, hf_h225_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key); + PROTO_ITEM_SET_HIDDEN(ti); dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree, actx); } actx->private_data = gefx; /* subdissector could overwrite it */ @@ -699,11 +700,13 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode #.FN_BODY Content/raw VAL_PTR = &value_tvb tvbuff_t *value_tvb; gef_ctx_t *gefx; + proto_item* ti; %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/ + ti = proto_tree_add_string(tree, hf_h225_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key); + PROTO_ITEM_SET_HIDDEN(ti); dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, %(ACTX)s); } #.END |