Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 21019: /trunk/plugins/profinet/ /tru
ulfl@xxxxxxxxxxxxx wrote:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=21019
User: ulfl
Date: 2007/03/11 12:07 PM
Log:
as Jeff made empty field names "illegal", he changed the way PN-IO and PN-PTCP showed their blocks in an unwanted way - fix it
Oops, sorry 'bout that.
Should I have?
I hadn't considered the usage like in PN-IO of an hf_ entry:
sub_item = proto_tree_add_item(tree, hf_pn_io_block, tvb, offset, 0, FALSE);
[...]
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, header_tree, drep,
hf_pn_io_block_type, &u16BlockType);
[...]
proto_item_set_text(sub_item, "%s",
val_to_str(u16BlockType, pn_io_block_type, "Unknown (0x%04x)"));
I've used proto_tree_add_text() to do the same thing before (avoiding
using an hf_ entry) but that's because I had what I wanted the subtree
item to look like when creating it. I don't know if you can add_text()
an empty string (to be filled in later).
Maybe empty names should be OK for FT_NONE's (which aren't filterable
anyway)?