aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-artnet.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-06-14 11:55:08 -0400
committerAnders Broman <a.broman58@gmail.com>2016-06-15 06:03:57 +0000
commit0ef1d941ea971fc4367b97ca7e7ab7a2ee9e9b88 (patch)
tree824d57e52d2cef773f6f93394483bd0f32cc94b8 /epan/dissectors/packet-artnet.c
parentc19e6c24067fd0aa1ea628de85f25ef9ece08839 (diff)
Allow control of individual columns to be (un)writable.
Most protocols just want to limit COL_INFO or COL_PROTOCOL so give that level of granularity. Bug: 12144 Bug: 5117 Bug: 11144 Change-Id: I8de9b7d2c69e90d3fbfc0a52c2bd78c3de58e2f8 Reviewed-on: https://code.wireshark.org/review/15894 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-artnet.c')
-rw-r--r--epan/dissectors/packet-artnet.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/epan/dissectors/packet-artnet.c b/epan/dissectors/packet-artnet.c
index 381aff1e9e..2723a111a8 100644
--- a/epan/dissectors/packet-artnet.c
+++ b/epan/dissectors/packet-artnet.c
@@ -2317,15 +2317,14 @@ dissect_artnet_output(tvbuff_t *tvb, guint offset, proto_tree *tree, packet_info
size = tvb_reported_length_remaining(tvb, offset);
- save_info = col_get_writable(pinfo->cinfo);
- col_set_writable(pinfo->cinfo, FALSE);
+ save_info = col_get_writable(pinfo->cinfo, COL_INFO);
+ col_set_writable(pinfo->cinfo, COL_INFO, FALSE);
next_tvb = tvb_new_subset_length(tvb, offset, length);
- /* XXX: Assumption: OK to call dmx-chan dissector under 'if (tree)' */
call_dissector(dmx_chan_handle, next_tvb, pinfo, base_tree);
- col_set_writable(pinfo->cinfo, save_info);
+ col_set_writable(pinfo->cinfo, COL_INFO, save_info);
return offset + size;
}
@@ -2813,15 +2812,14 @@ dissect_artnet_rdm(tvbuff_t *tvb, guint offset, proto_tree *tree, packet_info *
size = tvb_reported_length_remaining(tvb, offset);
- save_info = col_get_writable(pinfo->cinfo);
- col_set_writable(pinfo->cinfo, FALSE);
+ save_info = col_get_writable(pinfo->cinfo, COL_INFO);
+ col_set_writable(pinfo->cinfo, COL_INFO, FALSE);
next_tvb = tvb_new_subset_remaining(tvb, offset);
- /* XXX: Assumption: OK to call rdm dissector under 'if (tree)' */
call_dissector(rdm_handle, next_tvb, pinfo, base_tree);
- col_set_writable(pinfo->cinfo, save_info);
+ col_set_writable(pinfo->cinfo, COL_INFO, save_info);
return offset + size;
}
@@ -3322,7 +3320,6 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
break;
case ARTNET_OP_OUTPUT:
- if (tree) {
hi = proto_tree_add_item(artnet_tree,
hf_artnet_output,
tvb,
@@ -3336,7 +3333,6 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
size -= offset;
proto_item_set_len(si, size );
offset += size;
- }
break;
@@ -3435,7 +3431,6 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
break;
case ARTNET_OP_RDM:
- if (tree) {
hi = proto_tree_add_item(artnet_tree,
hf_artnet_rdm,
tvb,
@@ -3448,7 +3443,6 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
proto_item_set_len( si, size );
offset += size;
- }
break;
case ARTNET_OP_RDM_SUB: