diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-22 21:18:11 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-22 21:18:11 +0000 |
commit | c28bafe3410d90106484da1bf2d81aced697216f (patch) | |
tree | 1e8a02d47173f15306aadbd893999a857be9fb1f /epan/dissectors | |
parent | a05517fd21e64ace87b86d741ee83ece90fbcbfc (diff) |
Use col_set_str instead of col_add_fstr when adding constant strings to COL_INFO
svn path=/trunk/; revision=30082
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-dplay.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-dtn.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-kdp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-socks.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-stun.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-uts.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-xot.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-zrtp.c | 28 |
8 files changed, 30 insertions, 30 deletions
diff --git a/epan/dissectors/packet-dplay.c b/epan/dissectors/packet-dplay.c index 2303fc2e14..b3a9878417 100644 --- a/epan/dissectors/packet-dplay.c +++ b/epan/dissectors/packet-dplay.c @@ -1028,7 +1028,7 @@ static void dissect_dplay(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Clear out stuff in the info column */ col_clear(pinfo->cinfo, COL_INFO); if(check_col(pinfo->cinfo,COL_INFO)) - col_add_fstr(pinfo->cinfo,COL_INFO, "DPlay data packet"); + col_set_str(pinfo->cinfo, COL_INFO, "DPlay data packet"); return; } @@ -1141,7 +1141,7 @@ static void dissect_dplay_player_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tr /* Clear out stuff in the info column */ col_clear(pinfo->cinfo, COL_INFO); if(check_col(pinfo->cinfo,COL_INFO)) - col_add_fstr(pinfo->cinfo,COL_INFO, "DPlay player to player message"); + col_set_str(pinfo->cinfo, COL_INFO, "DPlay player to player message"); if(tree) { diff --git a/epan/dissectors/packet-dtn.c b/epan/dissectors/packet-dtn.c index 135fc379f1..74e71c6811 100644 --- a/epan/dissectors/packet-dtn.c +++ b/epan/dissectors/packet-dtn.c @@ -297,13 +297,13 @@ static void dissect_tcp_bundle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* Only Start and End flags (bits 0 & 1) are valid in Data Segment */ if((conv_hdr & ~(TCP_CONVERGENCE_TYPE_MASK | TCP_CONVERGENCE_DATA_FLAGS)) != 0) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Invalid TCP CL Data Segment Flags"); + col_set_str(pinfo->cinfo, COL_INFO, "Invalid TCP CL Data Segment Flags"); return; } fixed = 1; segment_length = evaluate_sdnv(tvb, fixed + frame_offset, &sdnv_length); if(segment_length < 0) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Protocol Error (Length)"); + col_set_str(pinfo->cinfo, COL_INFO, "Protocol Error (Length)"); return; } convergence_hdr_size = sdnv_length + fixed; @@ -357,7 +357,7 @@ static void dissect_tcp_bundle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if(new_tvb){ bundle_size = dissect_complete_bundle(new_tvb, pinfo, bundle_tree); if(bundle_size == 0) { /*Couldn't parse bundle*/ - col_add_fstr(pinfo->cinfo, COL_INFO, "Dissection Failed"); + col_set_str(pinfo->cinfo, COL_INFO, "Dissection Failed"); return; /*Give up*/ } } @@ -373,7 +373,7 @@ static void dissect_tcp_bundle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr * 2-segment case. */ - col_add_fstr(pinfo->cinfo, COL_INFO, "[Reassembled Segment of a Bundle]"); + col_set_str(pinfo->cinfo, COL_INFO, "[Reassembled Segment of a Bundle]"); } /* @@ -528,7 +528,7 @@ dissect_udp_bundle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) primary_tree = proto_item_add_subtree(primary_item, ett_primary_hdr); hdr_offset = dissect_primary_header(pinfo, primary_tree, tvb); if(hdr_offset == 0) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Protocol Error"); + col_set_str(pinfo->cinfo, COL_INFO, "Protocol Error"); return; } proto_item_set_len(primary_item, hdr_offset); @@ -549,7 +549,7 @@ dissect_udp_bundle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) hdr_offset, &lasthdrflag); } if(hdr_offset == 0) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Protocol Error"); + col_set_str(pinfo->cinfo, COL_INFO, "Protocol Error"); return; } if(lasthdrflag) { @@ -612,7 +612,7 @@ dissect_complete_bundle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) primary_tree = proto_item_add_subtree(primary_item, ett_primary_hdr); primary_header_size = dissect_primary_header(pinfo, primary_tree, tvb); if(primary_header_size == 0) { /*Couldn't parse primary header*/ - col_add_fstr(pinfo->cinfo, COL_INFO, "Protocol Error"); + col_set_str(pinfo->cinfo, COL_INFO, "Protocol Error"); return(0); /*Give up*/ } proto_item_set_len(primary_item, primary_header_size); @@ -638,7 +638,7 @@ dissect_complete_bundle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if(payload_size == 0) { /*Payload header parse failed*/ - col_add_fstr(pinfo->cinfo, COL_INFO, "Dissection Failed"); + col_set_str(pinfo->cinfo, COL_INFO, "Dissection Failed"); return (0); } offset += payload_size; @@ -1692,7 +1692,7 @@ dissect_contact_header(tvbuff_t *tvb, packet_info *pinfo, eid_length = evaluate_sdnv(tvb, 8, &sdnv_length); if(eid_length < 0) { if(check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Protocol Error (Local EID Length)"); + col_set_str(pinfo->cinfo, COL_INFO, "Protocol Error (Local EID Length)"); } return 0; } diff --git a/epan/dissectors/packet-kdp.c b/epan/dissectors/packet-kdp.c index c49fb01c32..a335d7c192 100644 --- a/epan/dissectors/packet-kdp.c +++ b/epan/dissectors/packet-kdp.c @@ -197,7 +197,7 @@ static void dissect_kdp(tvbuff_t *tvb, print more detailed summary info */ if (check_col(pinfo->cinfo, COL_INFO)) { if (version != 2) { - col_add_fstr(pinfo->cinfo, COL_INFO, "SDDP message"); + col_set_str(pinfo->cinfo, COL_INFO, "SDDP message"); } else { char ack_string[BUFFER_SIZE]; char seq_num_string[BUFFER_SIZE]; diff --git a/epan/dissectors/packet-socks.c b/epan/dissectors/packet-socks.c index af4b06bf95..cfbbf53c77 100644 --- a/epan/dissectors/packet-socks.c +++ b/epan/dissectors/packet-socks.c @@ -394,7 +394,7 @@ socks_udp_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { col_set_str(pinfo->cinfo, COL_PROTOCOL, "Socks"); if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "Version: 5, UDP Associated packet"); + col_set_str(pinfo->cinfo, COL_INFO, "Version: 5, UDP Associated packet"); if ( tree) { ti = proto_tree_add_protocol_format( tree, proto_socks, tvb, diff --git a/epan/dissectors/packet-stun.c b/epan/dissectors/packet-stun.c index d4f7fe187a..32716ea74b 100644 --- a/epan/dissectors/packet-stun.c +++ b/epan/dissectors/packet-stun.c @@ -439,7 +439,7 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* two first bits not NULL => should be a channel-data message*/ /* Clear out stuff in the info column */ - col_add_fstr(pinfo->cinfo, COL_INFO, "ChannelData TURN Message"); + col_set_str(pinfo->cinfo, COL_INFO, "ChannelData TURN Message"); if (!tree) return tvb_length(tvb); diff --git a/epan/dissectors/packet-uts.c b/epan/dissectors/packet-uts.c index d36cc796fd..42b42eb339 100644 --- a/epan/dissectors/packet-uts.c +++ b/epan/dissectors/packet-uts.c @@ -88,7 +88,7 @@ static int testchar(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, int op, g } } else { if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown Message Format"); + col_set_str(pinfo->cinfo, COL_INFO, "Unknown Message Format"); return 0; } } diff --git a/epan/dissectors/packet-xot.c b/epan/dissectors/packet-xot.c index 8021d8b86c..fbcbb7f01d 100644 --- a/epan/dissectors/packet-xot.c +++ b/epan/dissectors/packet-xot.c @@ -234,7 +234,7 @@ static void dissect_xot_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gint hdr_offset = offset; if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "XOT PVC Setup"); + col_set_str(pinfo->cinfo, COL_INFO, "XOT PVC Setup"); proto_item_set_len(ti, XOT_HEADER_LENGTH + plen); /* These fields are in overlay with packet-x25.c */ diff --git a/epan/dissectors/packet-zrtp.c b/epan/dissectors/packet-zrtp.c index 7d1edff0dd..329bdb3402 100644 --- a/epan/dissectors/packet-zrtp.c +++ b/epan/dissectors/packet-zrtp.c @@ -325,7 +325,7 @@ dissect_zrtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "ZRTP"); if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ZRTP Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "Unknown ZRTP Packet"); ti = proto_tree_add_protocol_format(tree,proto_zrtp,tvb,0,-1,"ZRTP protocol"); zrtp_tree = proto_item_add_subtree(ti,ett_zrtp); @@ -438,35 +438,35 @@ dissect_zrtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void dissect_ErrorACK(packet_info *pinfo) { if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "ErrorACK Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "ErrorACK Packet"); } } static void dissect_ClearACK(packet_info *pinfo) { if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "ClearACK Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "ClearACK Packet"); } } static void dissect_RelayACK(packet_info *pinfo) { if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "RelayACK Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "RelayACK Packet"); } } static void dissect_Conf2ACK(packet_info *pinfo) { if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Conf2ACK Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "Conf2ACK Packet"); } } static void dissect_HelloACK(packet_info *pinfo) { if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "HelloACK Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "HelloACK Packet"); } } @@ -475,7 +475,7 @@ dissect_Ping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *zrtp_tree) { unsigned int data_offset=24; if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Ping Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "Ping Packet"); } proto_tree_add_item(zrtp_tree,hf_zrtp_msg_ping_version,tvb,data_offset,4,FALSE); @@ -487,7 +487,7 @@ dissect_PingACK(tvbuff_t *tvb, packet_info *pinfo, proto_tree *zrtp_tree) { unsigned int data_offset=24; if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "PingACK Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "PingACK Packet"); } proto_tree_add_item(zrtp_tree,hf_zrtp_msg_ping_version,tvb,data_offset,4,FALSE); @@ -501,7 +501,7 @@ dissect_GoClear(tvbuff_t *tvb, packet_info *pinfo, proto_tree *zrtp_tree) { unsigned int data_offset=24; if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "GoClear Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "GoClear Packet"); } proto_tree_add_item(zrtp_tree,hf_zrtp_msg_hmac,tvb,data_offset+0,8,FALSE); @@ -512,7 +512,7 @@ dissect_Error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *zrtp_tree) { unsigned int data_offset=24; if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Error Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "Error Packet"); } proto_tree_add_item(zrtp_tree,hf_zrtp_msg_error,tvb,data_offset,4,FALSE); @@ -544,7 +544,7 @@ dissect_SASrelay(tvbuff_t *tvb, packet_info *pinfo, proto_tree *zrtp_tree) { int linelen; if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "SASrelay Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "SASrelay Packet"); } proto_tree_add_item(zrtp_tree,hf_zrtp_msg_hmac,tvb,data_offset+0,8,FALSE); @@ -592,7 +592,7 @@ dissect_Commit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *zrtp_tree) { unsigned int offset; if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Commit Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "Commit Packet"); } proto_tree_add_item(zrtp_tree,hf_zrtp_msg_hash_image,tvb,msg_offset+12,32,FALSE); @@ -665,14 +665,14 @@ dissect_Hello(tvbuff_t *tvb, packet_info *pinfo, proto_tree *zrtp_tree) { proto_tree *tmp_tree; if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Hello Packet"); + col_set_str(pinfo->cinfo, COL_INFO, "Hello Packet"); } tvb_memcpy(tvb,version_str,msg_offset+12,4); version_str[4]='\0'; if (check_valid_version(version_str) == NULL){ if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported version of ZRTP protocol"); + col_set_str(pinfo->cinfo, COL_INFO, "Unsupported version of ZRTP protocol"); } } proto_tree_add_item(zrtp_tree,hf_zrtp_msg_version,tvb,msg_offset+12,4,FALSE); |