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 | |
parent | a05517fd21e64ace87b86d741ee83ece90fbcbfc (diff) |
Use col_set_str instead of col_add_fstr when adding constant strings to COL_INFO
svn path=/trunk/; revision=30082
-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 | ||||
-rw-r--r-- | plugins/docsis/packet-dccack.c | 2 | ||||
-rw-r--r-- | plugins/docsis/packet-dccreq.c | 2 | ||||
-rw-r--r-- | plugins/docsis/packet-dccrsp.c | 2 | ||||
-rw-r--r-- | plugins/docsis/packet-dcd.c | 2 | ||||
-rw-r--r-- | plugins/docsis/packet-mdd.c | 2 | ||||
-rw-r--r-- | plugins/docsis/packet-regreqmp.c | 3 | ||||
-rw-r--r-- | plugins/docsis/packet-regrspmp.c | 3 | ||||
-rw-r--r-- | plugins/docsis/packet-sync.c | 3 | ||||
-rw-r--r-- | plugins/profinet/packet-pn-rt.c | 2 |
17 files changed, 39 insertions, 42 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); diff --git a/plugins/docsis/packet-dccack.c b/plugins/docsis/packet-dccack.c index 07613ebc92..d4ce610e29 100644 --- a/plugins/docsis/packet-dccack.c +++ b/plugins/docsis/packet-dccack.c @@ -58,7 +58,7 @@ dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (check_col (pinfo->cinfo, COL_INFO)) { col_clear (pinfo->cinfo, COL_INFO); - col_add_fstr (pinfo->cinfo, COL_INFO,"DCC-ACK Message: "); + col_set_str(pinfo->cinfo, COL_INFO, "DCC-ACK Message: "); } if (tree) diff --git a/plugins/docsis/packet-dccreq.c b/plugins/docsis/packet-dccreq.c index 5df2dd6dee..38146a19ce 100644 --- a/plugins/docsis/packet-dccreq.c +++ b/plugins/docsis/packet-dccreq.c @@ -268,7 +268,7 @@ dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (check_col (pinfo->cinfo, COL_INFO)) { col_clear (pinfo->cinfo, COL_INFO); - col_add_fstr (pinfo->cinfo, COL_INFO,"DCC-REQ Message: "); + col_set_str(pinfo->cinfo, COL_INFO, "DCC-REQ Message: "); } if (tree) diff --git a/plugins/docsis/packet-dccrsp.c b/plugins/docsis/packet-dccrsp.c index 1d94113136..fdc65aa376 100644 --- a/plugins/docsis/packet-dccrsp.c +++ b/plugins/docsis/packet-dccrsp.c @@ -114,7 +114,7 @@ dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (check_col (pinfo->cinfo, COL_INFO)) { col_clear (pinfo->cinfo, COL_INFO); - col_add_fstr (pinfo->cinfo, COL_INFO,"DCC-RSP Message: "); + col_set_str(pinfo->cinfo, COL_INFO, "DCC-RSP Message: "); } if (tree) diff --git a/plugins/docsis/packet-dcd.c b/plugins/docsis/packet-dcd.c index ddaa99ee0d..4aa335ee9d 100644 --- a/plugins/docsis/packet-dcd.c +++ b/plugins/docsis/packet-dcd.c @@ -516,7 +516,7 @@ dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (check_col (pinfo->cinfo, COL_INFO)) { col_clear (pinfo->cinfo, COL_INFO); - col_add_fstr (pinfo->cinfo, COL_INFO,"DCD Message: "); + col_set_str(pinfo->cinfo, COL_INFO, "DCD Message: "); } if (tree) diff --git a/plugins/docsis/packet-mdd.c b/plugins/docsis/packet-mdd.c index 3bfce9252b..cb09705fac 100644 --- a/plugins/docsis/packet-mdd.c +++ b/plugins/docsis/packet-mdd.c @@ -325,7 +325,7 @@ dissect_mdd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (check_col (pinfo->cinfo, COL_INFO)) { col_clear (pinfo->cinfo, COL_INFO); - col_add_fstr (pinfo->cinfo, COL_INFO, "MDD Message:"); + col_set_str(pinfo->cinfo, COL_INFO, "MDD Message:"); } if (tree) diff --git a/plugins/docsis/packet-regreqmp.c b/plugins/docsis/packet-regreqmp.c index 0aca5e6e22..ffd681232c 100644 --- a/plugins/docsis/packet-regreqmp.c +++ b/plugins/docsis/packet-regreqmp.c @@ -58,8 +58,7 @@ dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (check_col (pinfo->cinfo, COL_INFO)) { col_clear (pinfo->cinfo, COL_INFO); - col_add_fstr (pinfo->cinfo, COL_INFO, - "REG-REQ-MP Message:"); + col_set_str(pinfo->cinfo, COL_INFO, "REG-REQ-MP Message:"); } if (tree) diff --git a/plugins/docsis/packet-regrspmp.c b/plugins/docsis/packet-regrspmp.c index d318b6c913..2bc6df62ca 100644 --- a/plugins/docsis/packet-regrspmp.c +++ b/plugins/docsis/packet-regrspmp.c @@ -63,8 +63,7 @@ dissect_regrspmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (check_col (pinfo->cinfo, COL_INFO)) { col_clear (pinfo->cinfo, COL_INFO); - col_add_fstr (pinfo->cinfo, COL_INFO, - "REG-RSP-MP Message:"); + col_set_str(pinfo->cinfo, COL_INFO, "REG-RSP-MP Message:"); } if (tree) diff --git a/plugins/docsis/packet-sync.c b/plugins/docsis/packet-sync.c index ec6a8e0c49..48eeaf7399 100644 --- a/plugins/docsis/packet-sync.c +++ b/plugins/docsis/packet-sync.c @@ -48,8 +48,7 @@ dissect_sync (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (check_col (pinfo->cinfo, COL_INFO)) { col_clear (pinfo->cinfo, COL_INFO); - col_add_fstr (pinfo->cinfo, COL_INFO, - "Sync Message:"); + col_set_str(pinfo->cinfo, COL_INFO, "Sync Message:"); } if (tree) diff --git a/plugins/profinet/packet-pn-rt.c b/plugins/profinet/packet-pn-rt.c index b39ffd1b8e..76dce6453f 100644 --- a/plugins/profinet/packet-pn-rt.c +++ b/plugins/profinet/packet-pn-rt.c @@ -676,7 +676,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* ask heuristics, if some sub-dissector is interested in this packet payload */ if(!dissector_try_heuristic(heur_subdissector_list, next_tvb, pinfo, tree)) { /*if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown");*/ + col_set_str(pinfo->cinfo, COL_INFO, "Unknown");*/ /* Oh, well, we don't know this; dissect it as data. */ dissect_pn_undecoded(next_tvb, 0, pinfo, tree, tvb_length(next_tvb)); |