Use col_set_str instead of col_add_fstr when adding constant strings to COL_INFO
authorkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 22 Sep 2009 21:18:11 +0000 (21:18 +0000)
committerkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 22 Sep 2009 21:18:11 +0000 (21:18 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30082 f5534014-38df-0310-8fa8-9805f1628bb7

17 files changed:
epan/dissectors/packet-dplay.c
epan/dissectors/packet-dtn.c
epan/dissectors/packet-kdp.c
epan/dissectors/packet-socks.c
epan/dissectors/packet-stun.c
epan/dissectors/packet-uts.c
epan/dissectors/packet-xot.c
epan/dissectors/packet-zrtp.c
plugins/docsis/packet-dccack.c
plugins/docsis/packet-dccreq.c
plugins/docsis/packet-dccrsp.c
plugins/docsis/packet-dcd.c
plugins/docsis/packet-mdd.c
plugins/docsis/packet-regreqmp.c
plugins/docsis/packet-regrspmp.c
plugins/docsis/packet-sync.c
plugins/profinet/packet-pn-rt.c

index 2303fc2e1424826370d0bbfc6306d11dbb1ef61c..b3a9878417d1e6a99ad8af95029ae8f414ca8ed7 100644 (file)
@@ -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)
     {
index 135fc379f1dcdaaf44025283bad766f7d0bffd6c..74e71c6811a396a20c71f4bbf8151884c382236b 100644 (file)
@@ -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;
     }
index c49fb01c32ee5738c4f57ea55b28bd70ac5e81f8..a335d7c1929b1fb8f626c1e72e626d3ba01cc401 100644 (file)
@@ -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];
index af4b06bf95bf21f8e9edbd84d233f20484e81d34..cfbbf53c7775f57a9b4197b965b3499c4a778752 100644 (file)
@@ -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,
index d4f7fe187aab25bf962f0ee3cb8f39e18a0b40aa..32716ea74b253f64d6ef9743b4cb73a75ccaf56a 100644 (file)
@@ -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);
index d36cc796fdd8226e39c8956485a655a4795f0ac9..42b42eb3393ba276cdc3abd10a764b388c87d0cc 100644 (file)
@@ -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;       
        }
 }
index 8021d8b86c332cb6f53dd9212c4ca1a6be74b8a8..fbcbb7f01d9332db07e4380359d7a04755fea2ce 100644 (file)
@@ -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 */
index 7d1edff0dd6495cef4f4a2eb941a04c8818973f1..329bdb34028f3aba9eb2d91969754028f1f685dc 100644 (file)
@@ -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);
index 07613ebc92e1bded8ea531da64145d057dbb81a4..d4ce610e29bd5577947159ec457e5d665192288b 100644 (file)
@@ -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)
index 5df2dd6dee4a58941ff11d589c3da5df6d349bd8..38146a19ce9c9c4d135e849c71752f48cfab684e 100644 (file)
@@ -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)
index 1d941131369cc19b488b865cdc08722607484b52..fdc65aa3760eaf469b0dd87ab91bdf0981775bd1 100644 (file)
@@ -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)
index ddaa99ee0d18144d8fc333e9b259c6f34591e893..4aa335ee9d0bcf62835abec133b8d21fc94f11bf 100644 (file)
@@ -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)
index 3bfce9252b91537e5b5d066b8271f78c96dd87df..cb09705facb7485fa499c7e8fbea6e9dbe35b496 100644 (file)
@@ -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)
index 0aca5e6e2254c7e9c5373e9eb8ac6fb5c0bf286d..ffd681232c425c016f668261047c0d5a48728b7e 100644 (file)
@@ -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)
index d318b6c9134badde3c5e6bf6cfabd909f1f72d52..2bc6df62caf8ad8efea206137e3c769e4ae1bf43 100644 (file)
@@ -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)
index ec6a8e0c491a4b52c1aced4d8e8c58f98985851b..48eeaf7399f5b846eb4616b99893719d268eada2 100644 (file)
@@ -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)
index b39ffd1b8ec6bbbac6b09d62e5c39c7ed5438477..76dce6453f5bf3edb3902baab52e23b359bd4cff 100644 (file)
@@ -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));