aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-12-08 11:27:14 +0000
committerGuy Harris <guy@alum.mit.edu>2005-12-08 11:27:14 +0000
commitaaf8a3060d2d4df23420189ecd50c9be2c3654aa (patch)
treeaf9ad8cf908ee3860825d8e49c0c72124caaa1e5 /epan
parentd3219603304a185acd55e7d1e5e898d72d20bb58 (diff)
Clean up indentation.
For OID fields of type FT_STRING, put back the code to append the OID name. (Ultimately, we should probably convert them all to type FT_OID.) svn path=/trunk/; revision=16734
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-ber.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c
index ef5794706e..633e5b51e2 100644
--- a/epan/dissectors/packet-ber.c
+++ b/epan/dissectors/packet-ber.c
@@ -1771,18 +1771,23 @@ printf("OBJECT IDENTIFIER dissect_ber_object_identifier(%s) entered\n",name);
eoffset=offset+len;
}
- hfi = proto_registrar_get_nth(hf_id);
- if (hfi->type == FT_OID) {
- item = proto_tree_add_item(tree, hf_id, tvb, offset, len, FALSE);
- } else if (IS_FT_STRING(hfi->type)) {
- str = oid_to_str(tvb_get_ptr(tvb, offset, len), len);
- item = proto_tree_add_string(tree, hf_id, tvb, offset, len, str);
- } else {
- DISSECTOR_ASSERT_NOT_REACHED();
- }
+ hfi = proto_registrar_get_nth(hf_id);
+ if (hfi->type == FT_OID) {
+ item = proto_tree_add_item(tree, hf_id, tvb, offset, len, FALSE);
+ } else if (IS_FT_STRING(hfi->type)) {
+ str = oid_to_str(tvb_get_ptr(tvb, offset, len), len);
+ item = proto_tree_add_string(tree, hf_id, tvb, offset, len, str);
+ /* see if we know the name of this oid */
+ if(item){
+ proto_item_append_text(item, " (%s)",
+ get_oid_name(tvb_get_ptr(tvb, offset, len), len));
+ }
+ } else {
+ DISSECTOR_ASSERT_NOT_REACHED();
+ }
- if (value_tvb)
- *value_tvb = tvb_new_subset(tvb, offset, len, len);
+ if (value_tvb)
+ *value_tvb = tvb_new_subset(tvb, offset, len, len);
return eoffset;
}