diff options
Diffstat (limited to 'epan/dissectors/packet-tns.c')
-rw-r--r-- | epan/dissectors/packet-tns.c | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/epan/dissectors/packet-tns.c b/epan/dissectors/packet-tns.c index c88a8cbb4d..fb006d8bcf 100644 --- a/epan/dissectors/packet-tns.c +++ b/epan/dissectors/packet-tns.c @@ -290,24 +290,18 @@ static void dissect_tns_data(tvbuff_t *tvb, int offset, packet_info *pinfo, } offset += 2; - if ( check_col(pinfo->cinfo, COL_INFO) ) + if ( is_sns ) { - if ( is_sns ) - { - col_append_str(pinfo->cinfo, COL_INFO, ", SNS"); - } - else - { - col_append_str(pinfo->cinfo, COL_INFO, ", Data"); - } + col_append_str(pinfo->cinfo, COL_INFO, ", SNS"); } - - if ( data_tree ) + else { - call_dissector(data_handle, - tvb_new_subset_remaining(tvb, offset), pinfo, data_tree); + col_append_str(pinfo->cinfo, COL_INFO, ", Data"); } + call_dissector(data_handle, + tvb_new_subset_remaining(tvb, offset), pinfo, data_tree); + return; } @@ -736,16 +730,13 @@ static void dissect_tns_marker(tvbuff_t *tvb, int offset, packet_info *pinfo, PROTO_ITEM_SET_HIDDEN(hidden_item); } - if ( check_col(pinfo->cinfo, COL_INFO) ) + if ( is_attention ) { - if ( is_attention ) - { - col_append_str(pinfo->cinfo, COL_INFO, ", Marker"); - } - else - { - col_append_str(pinfo->cinfo, COL_INFO, ", Attention"); - } + col_append_str(pinfo->cinfo, COL_INFO, ", Marker"); + } + else + { + col_append_str(pinfo->cinfo, COL_INFO, ", Attention"); } if ( marker_tree ) @@ -884,11 +875,8 @@ dissect_tns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "TNS"); - if (check_col(pinfo->cinfo, COL_INFO)) - { - col_set_str(pinfo->cinfo, COL_INFO, + col_set_str(pinfo->cinfo, COL_INFO, (pinfo->match_uint == pinfo->destport) ? "Request" : "Response"); - } if (tree) { @@ -931,11 +919,8 @@ dissect_tns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } offset += 1; - if ( check_col(pinfo->cinfo, COL_INFO)) - { - col_append_fstr(pinfo->cinfo, COL_INFO, ", %s (%u)", + col_append_fstr(pinfo->cinfo, COL_INFO, ", %s (%u)", val_to_str_const(type, tns_type_vals, "Unknown"), type); - } if ( tree ) { |