diff options
author | krj <krj@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-08-09 07:59:51 +0000 |
---|---|---|
committer | krj <krj@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-08-09 07:59:51 +0000 |
commit | 7a1740736d1aca5c3f0e07951327d24056237c5c (patch) | |
tree | ef21c459b918013ddfaded20b267565537e9bf64 /epan/dissectors/packet-bittorrent.c | |
parent | b2e9a22ec53becba2c23777ffee4ff375d135698 (diff) |
Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29345 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-bittorrent.c')
-rw-r--r-- | epan/dissectors/packet-bittorrent.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c index 0e17a910fe..fe537a2250 100644 --- a/epan/dissectors/packet-bittorrent.c +++ b/epan/dissectors/packet-bittorrent.c @@ -555,9 +555,7 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto } */ if (msgtype == NULL) { proto_tree_add_text(tree, tvb, offset, -1, "Continuation data"); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_set_str(pinfo->cinfo, COL_INFO, "Continuation data"); - } + col_set_str(pinfo->cinfo, COL_INFO, "Continuation data"); return; } } else { @@ -575,9 +573,7 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto /* Keepalive message */ if (length == 0) { proto_tree_add_item(mtree, hf_bittorrent_msg_len, tvb, offset, BITTORRENT_HEADER_LENGTH, FALSE); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_set_str(pinfo->cinfo, COL_INFO, "KeepAlive"); - } + col_set_str(pinfo->cinfo, COL_INFO, "KeepAlive"); return; } @@ -686,9 +682,7 @@ static void dissect_bittorrent_welcome (tvbuff_t *tvb, packet_info *pinfo _U_, p int i; char *version; - if (check_col(pinfo->cinfo, COL_INFO)) { - col_set_str(pinfo->cinfo, COL_INFO, "Handshake"); - } + col_set_str(pinfo->cinfo, COL_INFO, "Handshake"); proto_tree_add_item(tree, hf_bittorrent_prot_name_len, tvb, offset, 1, FALSE); offset+=1; proto_tree_add_item(tree, hf_bittorrent_prot_name, tvb, offset, 19, FALSE); offset += 19; @@ -721,13 +715,9 @@ static void dissect_bittorrent_tcp_pdu (tvbuff_t *tvb, packet_info *pinfo, proto { proto_item *ti; - if (check_col(pinfo->cinfo, COL_PROTOCOL)) { - col_set_str(pinfo->cinfo, COL_PROTOCOL, "BitTorrent"); - } + col_set_str(pinfo->cinfo, COL_PROTOCOL, "BitTorrent"); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_set_str(pinfo->cinfo, COL_INFO, "BitTorrent "); - } + col_set_str(pinfo->cinfo, COL_INFO, "BitTorrent "); ti = proto_tree_add_item (tree, proto_bittorrent, tvb, 0, -1, FALSE); tree = proto_item_add_subtree(ti, ett_bittorrent); |