coap: Use proto_tree_add_item for strings in the packet
Change from proto_tree_add_string() to proto_tree_add_item() for strings which is fetched from the packet. Change-Id: Iae6538977b2ecf69f83c62b47ac02198f5f09d54 Reviewed-on: https://code.wireshark.org/review/29348 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
db37b664fb
commit
abc1f64576
|
@ -373,7 +373,7 @@ dissect_coap_opt_uri_path(tvbuff_t *tvb, proto_item *head_item, proto_tree *subt
|
|||
wmem_strbuf_append(coinfo->uri_str_strbuf, str);
|
||||
}
|
||||
|
||||
proto_tree_add_string(subtree, hf, tvb, offset, opt_length, str);
|
||||
proto_tree_add_item(subtree, hf, tvb, offset, opt_length, ENC_ASCII);
|
||||
|
||||
/* add info to the head of the packet detail */
|
||||
proto_item_append_text(head_item, ": %s", str);
|
||||
|
@ -394,7 +394,7 @@ dissect_coap_opt_uri_query(tvbuff_t *tvb, proto_item *head_item,proto_tree *subt
|
|||
wmem_strbuf_append(coinfo->uri_query_strbuf, str);
|
||||
}
|
||||
|
||||
proto_tree_add_string(subtree, hf, tvb, offset, opt_length, str);
|
||||
proto_tree_add_item(subtree, hf, tvb, offset, opt_length, ENC_ASCII);
|
||||
|
||||
/* add info to the head of the packet detail */
|
||||
proto_item_append_text(head_item, ": %s", str);
|
||||
|
@ -411,7 +411,7 @@ dissect_coap_opt_location_path(tvbuff_t *tvb, proto_item *head_item, proto_tree
|
|||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, opt_length, ENC_ASCII);
|
||||
}
|
||||
|
||||
proto_tree_add_string(subtree, hf, tvb, offset, opt_length, str);
|
||||
proto_tree_add_item(subtree, hf, tvb, offset, opt_length, ENC_ASCII);
|
||||
|
||||
/* add info to the head of the packet detail */
|
||||
proto_item_append_text(head_item, ": %s", str);
|
||||
|
@ -428,7 +428,7 @@ dissect_coap_opt_location_query(tvbuff_t *tvb, proto_item *head_item, proto_tree
|
|||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, opt_length, ENC_ASCII);
|
||||
}
|
||||
|
||||
proto_tree_add_string(subtree, hf, tvb, offset, opt_length, str);
|
||||
proto_tree_add_item(subtree, hf, tvb, offset, opt_length, ENC_ASCII);
|
||||
|
||||
/* add info to the head of the packet detail */
|
||||
proto_item_append_text(head_item, ": %s", str);
|
||||
|
@ -543,7 +543,7 @@ dissect_coap_opt_proxy_uri(tvbuff_t *tvb, proto_item *head_item, proto_tree *sub
|
|||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, opt_length, ENC_ASCII);
|
||||
}
|
||||
|
||||
proto_tree_add_string(subtree, hf, tvb, offset, opt_length, str);
|
||||
proto_tree_add_item(subtree, hf, tvb, offset, opt_length, ENC_ASCII);
|
||||
|
||||
/* add info to the head of the packet detail */
|
||||
proto_item_append_text(head_item, ": %s", str);
|
||||
|
@ -560,7 +560,7 @@ dissect_coap_opt_proxy_scheme(tvbuff_t *tvb, proto_item *head_item, proto_tree *
|
|||
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, opt_length, ENC_ASCII);
|
||||
}
|
||||
|
||||
proto_tree_add_string(subtree, hf, tvb, offset, opt_length, str);
|
||||
proto_tree_add_item(subtree, hf, tvb, offset, opt_length, ENC_ASCII);
|
||||
|
||||
/* add info to the head of the packet detail */
|
||||
proto_item_append_text(head_item, ": %s", str);
|
||||
|
|
Loading…
Reference in New Issue