diff options
author | Bill Meier <wmeier@newsguy.com> | 2015-01-26 13:58:01 -0500 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2015-01-26 20:09:54 +0000 |
commit | 5845f290eecbabb8138eaf53dd33689d8ddf8b7a (patch) | |
tree | 10ce6b7bea98666f8559a338d15260957edd0f0f /epan/dissectors/packet-rtp.c | |
parent | 717b5a2ecf15b7e7ad3483fa9d8c64336f8456a5 (diff) | |
download | wireshark-5845f290eecbabb8138eaf53dd33689d8ddf8b7a.tar.gz |
rtp: Don't call col_...() under 'if (tree)'
Change-Id: I7d75e8d02aeaa67155ec52dd0167d1692286b951
Reviewed-on: https://code.wireshark.org/review/6800
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/dissectors/packet-rtp.c')
-rw-r--r-- | epan/dissectors/packet-rtp.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c index d44101bc76..d36f27fd22 100644 --- a/epan/dissectors/packet-rtp.c +++ b/epan/dissectors/packet-rtp.c @@ -2411,17 +2411,17 @@ dissect_rtp_hdr_ext_ed137(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) rtp_hext_tree = proto_item_add_subtree( ti, ett_hdr_ext_ed137s ); } for(i=0; i<hdr_extension_len; i++) { + ext_value=tvb_get_ntohl( tvb, hdrext_offset ); + + if (RTP_ED137_ptt_mask(ext_value)) { + col_append_str(pinfo->cinfo, COL_INFO, ", PTT"); + } + if (RTP_ED137_squ_mask(ext_value)) { + col_append_str(pinfo->cinfo, COL_INFO, ", SQU"); + } if ( tree ) { ti2 = proto_tree_add_item(rtp_hext_tree, hf_rtp_hdr_ed137, tvb, hdrext_offset, 4, ENC_NA); rtp_hext_tree2 = proto_item_add_subtree( ti2, ett_hdr_ext_ed137 ); - ext_value=tvb_get_ntohl( tvb, hdrext_offset ); - - if (RTP_ED137_ptt_mask(ext_value)) { - col_append_str(pinfo->cinfo, COL_INFO, ", PTT"); - } - if (RTP_ED137_squ_mask(ext_value)) { - col_append_str(pinfo->cinfo, COL_INFO, ", SQU"); - } /* Following bits are used from ED137 RTPRx/RTPTx Information field */ proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ptt_type, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN); @@ -2500,17 +2500,17 @@ dissect_rtp_hdr_ext_ed137a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) rtp_hext_tree = proto_item_add_subtree( ti, ett_hdr_ext_ed137s ); } for(i=0; i<hdr_extension_len; i++) { + ext_value=tvb_get_ntohl( tvb, hdrext_offset ); + + if (RTP_ED137A_ptt_mask(ext_value)) { + col_append_str(pinfo->cinfo, COL_INFO, ", PTT"); + } + if (RTP_ED137A_squ_mask(ext_value)) { + col_append_str(pinfo->cinfo, COL_INFO, ", SQU"); + } if ( tree ) { ti2 = proto_tree_add_item(rtp_hext_tree, hf_rtp_hdr_ed137a, tvb, hdrext_offset, 4, ENC_NA); rtp_hext_tree2 = proto_item_add_subtree( ti2, ett_hdr_ext_ed137a ); - ext_value=tvb_get_ntohl( tvb, hdrext_offset ); - - if (RTP_ED137A_ptt_mask(ext_value)) { - col_append_str(pinfo->cinfo, COL_INFO, ", PTT"); - } - if (RTP_ED137A_squ_mask(ext_value)) { - col_append_str(pinfo->cinfo, COL_INFO, ", SQU"); - } /* Following bits are used from ED137A/B RTPRx Information field */ proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_ptt_type, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN); |