diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-22 14:48:10 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-22 14:48:10 +0000 |
commit | aaec16e376e92df9d6803dfa331a17cc7438b549 (patch) | |
tree | 5a2702ba3d6522756bdb3fd7b1ffdbc557945832 /plugins | |
parent | 85b70438c1e8cc4c4ee713703942a7ebc512640f (diff) |
Use the return value of proto_item_add_subtree(): put the filter masks in their own subtree (as it appears was intended).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36811 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ethercat/packet-ecatmb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/ethercat/packet-ecatmb.c b/plugins/ethercat/packet-ecatmb.c index 84936e927e..6d763f5a45 100644 --- a/plugins/ethercat/packet-ecatmb.c +++ b/plugins/ethercat/packet-ecatmb.c @@ -1141,6 +1141,8 @@ static void dissect_ecat_eoe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro anItem = proto_tree_add_item(ecat_fraghead_tree, hf_ecat_mailbox_eoe_macfilter, tvb, offset, MIN(eoe_length-offset, ETHERCAT_EOE_MACFILTER_LEN), TRUE); if( eoe_length-offset >= ETHERCAT_EOE_MACFILTER_LEN ) { + proto_tree *ecat_eoe_macfilter_filtermask_tree; + ecat_eoe_macfilter_tree = proto_item_add_subtree(anItem, ett_ecat_mailbox_eoe_macfilter); proto_tree_add_item(ecat_eoe_macfilter_tree, hf_ecat_mailbox_eoe_macfilter_macfiltercount, tvb, offset, 4, TRUE); proto_tree_add_item(ecat_eoe_macfilter_tree, hf_ecat_mailbox_eoe_macfilter_maskcount, tvb, offset, 4, TRUE); @@ -1155,9 +1157,9 @@ static void dissect_ecat_eoe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro offset+=16*ETHERNET_ADDRESS_LEN; anItem = proto_tree_add_item(ecat_eoe_macfilter_tree, hf_ecat_mailbox_eoe_macfilter_filtermask, tvb, offset, 4*sizeof(guint32), TRUE); - proto_item_add_subtree(anItem, ett_ecat_mailbox_eoe_macfilter_filtermask); + ecat_eoe_macfilter_filtermask_tree = proto_item_add_subtree(anItem, ett_ecat_mailbox_eoe_macfilter_filtermask); for( nCnt=0; nCnt<options.v.MacFilterMaskCount; nCnt++) - proto_tree_add_item(ecat_eoe_macfilter_tree, hf_ecat_mailbox_eoe_macfilter_filtermasks[nCnt], tvb, offset+nCnt*sizeof(guint32), sizeof(guint32), TRUE); + proto_tree_add_item(ecat_eoe_macfilter_filtermask_tree, hf_ecat_mailbox_eoe_macfilter_filtermasks[nCnt], tvb, offset+nCnt*sizeof(guint32), sizeof(guint32), TRUE); } else proto_item_append_text(anItem, " - Invalid length!"); |