aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-coap.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2018-08-30 13:37:28 +0200
committerAnders Broman <a.broman58@gmail.com>2018-08-30 12:07:59 +0000
commitabc1f645764a32af2f3806f12ff400827da32d8d (patch)
treef5d267336a40b484b8abd7147c14170db0897ae5 /epan/dissectors/packet-coap.c
parentdb37b664fb98c6a5aff7769a879da003ac19d2c7 (diff)
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>
Diffstat (limited to 'epan/dissectors/packet-coap.c')
-rw-r--r--epan/dissectors/packet-coap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c
index 4326eca948..5e212c5fd8 100644
--- a/epan/dissectors/packet-coap.c
+++ b/epan/dissectors/packet-coap.c
@@ -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);