data: Add data shown as text to Info column

Fill the Info column when showing data as text.
This commit is contained in:
Stig Bjørlykke 2022-03-11 15:06:29 +01:00 committed by A Wireshark GitLab Utility
parent bf21921445
commit 60ba57387c
1 changed files with 2 additions and 0 deletions

View File

@ -84,8 +84,10 @@ dissect_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (show_as_text) {
if (uncompr_tvb && uncompr_len > 0) {
proto_tree_add_item(data_tree, hf_data_text, uncompr_tvb, 0, uncompr_len, ENC_ASCII);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s", tvb_format_text_wsp(pinfo->pool, uncompr_tvb, 0, uncompr_len));
} else {
proto_tree_add_item(data_tree, hf_data_text, data_tvb, 0, bytes, ENC_ASCII);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s", tvb_format_text_wsp(pinfo->pool, data_tvb, 0, bytes));
}
}