diff options
author | Michael Mann <mmann78@netscape.net> | 2016-06-14 11:55:08 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-15 06:03:57 +0000 |
commit | 0ef1d941ea971fc4367b97ca7e7ab7a2ee9e9b88 (patch) | |
tree | 824d57e52d2cef773f6f93394483bd0f32cc94b8 /epan/dissectors/packet-ndmp.c | |
parent | c19e6c24067fd0aa1ea628de85f25ef9ece08839 (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-ndmp.c')
-rw-r--r-- | epan/dissectors/packet-ndmp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index 1fe64719d2..f3f0d4600d 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -2991,7 +2991,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* wmem_map_t *frags; conversation_t *conversation; proto_item *vers_item; - gboolean save_fragmented, save_writable; + gboolean save_fragmented, save_info_writable, save_proto_writable; gboolean do_frag = TRUE; tvbuff_t* new_tvb = NULL; fragment_head *frag_msg = NULL; @@ -3212,8 +3212,10 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* * multiple fragments, the column becomes unwritable. * Temporarily change that so that the correct header can be * applied */ - save_writable = col_get_writable(pinfo->cinfo); - col_set_writable(pinfo->cinfo, TRUE); + save_info_writable = col_get_writable(pinfo->cinfo, COL_INFO); + save_proto_writable = col_get_writable(pinfo->cinfo, COL_PROTOCOL); + col_set_writable(pinfo->cinfo, COL_PROTOCOL, TRUE); + col_set_writable(pinfo->cinfo, COL_INFO, TRUE); col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDMP"); col_clear(pinfo->cinfo, COL_INFO); @@ -3292,7 +3294,8 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* /* restore saved variables */ pinfo->fragmented = save_fragmented; - col_set_writable(pinfo->cinfo, save_writable); + col_set_writable(pinfo->cinfo, COL_INFO, save_info_writable); + col_set_writable(pinfo->cinfo, COL_PROTOCOL, save_proto_writable); return tvb_captured_length(tvb); } |