diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-10-15 18:46:26 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-10-15 18:46:26 +0000 |
commit | 126aa8539380e6b0b465b48d30f349b76afdc489 (patch) | |
tree | 16b43738b14751d74a8ca8e4de803ba0b6c87196 /epan/dissectors/packet-mongo.c | |
parent | 4c9bb81ad7b0f609fa236c808a1ab9ef6cab5a79 (diff) |
Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
then use ENC_ASCII.
2. For all but FT_UINT_STRING, always use ENC_NA
(replacing any existing True/1/FALSE/0
/ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).
svn path=/trunk/; revision=39426
Diffstat (limited to 'epan/dissectors/packet-mongo.c')
-rw-r--r-- | epan/dissectors/packet-mongo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-mongo.c b/epan/dissectors/packet-mongo.c index 70f788f2b3..0ec06528ba 100644 --- a/epan/dissectors/packet-mongo.c +++ b/epan/dissectors/packet-mongo.c @@ -139,9 +139,9 @@ dissect_fullcollectionname(tvbuff_t *tvb, guint offset, proto_tree *tree) fcn_tree = proto_item_add_subtree(ti, ett_mongo_fcn); - proto_tree_add_item(fcn_tree, hf_mongo_database_name, tvb, offset, dbn_length, ENC_NA); + proto_tree_add_item(fcn_tree, hf_mongo_database_name, tvb, offset, dbn_length, ENC_ASCII|ENC_NA); - proto_tree_add_item(fcn_tree, hf_mongo_collection_name, tvb, offset + 1 + dbn_length, fcn_length - dbn_length - 2, ENC_NA); + proto_tree_add_item(fcn_tree, hf_mongo_collection_name, tvb, offset + 1 + dbn_length, fcn_length - dbn_length - 2, ENC_ASCII|ENC_NA); return fcn_length; } @@ -199,7 +199,7 @@ dissect_mongo_msg(tvbuff_t *tvb, guint offset, proto_tree *tree) proto_item *ti; - ti = proto_tree_add_item(tree, hf_mongo_message, tvb, offset, -1, ENC_NA); + ti = proto_tree_add_item(tree, hf_mongo_message, tvb, offset, -1, ENC_ASCII|ENC_NA); offset += proto_item_get_len(ti); return offset; |