Remove some proto_tree_add_text outside the dissector directory.
authorMichael Mann <mmann78@netscape.net>
Mon, 29 Dec 2014 02:43:51 +0000 (21:43 -0500)
committerMichael Mann <mmann78@netscape.net>
Mon, 29 Dec 2014 23:10:12 +0000 (23:10 +0000)
Change-Id: I890846a0cede755a603243b4048fb5c917b2826b
Reviewed-on: https://code.wireshark.org/review/6112
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/gcp.c
epan/oids.c

index 4f5287f3c1160cfab16c48826aa3a0da35a0956f..65797d30bf51c8f4e35d940b67fdaca04686e492 100644 (file)
@@ -718,8 +718,7 @@ void gcp_analyze_msg(proto_tree* gcp_tree, packet_info* pinfo, tvbuff_t* gcp_tvb
         PROTO_ITEM_SET_GENERATED(ctx_item);
 
         if (ctx->cmds) {
-            proto_item* history_item = proto_tree_add_text(ctx_tree,gcp_tvb,0,0,"[ Command History ]");
-            proto_tree* history_tree = proto_item_add_subtree(history_item,ids->ett.ctx_cmds);
+            proto_tree* history_tree = proto_tree_add_subtree(ctx_tree,gcp_tvb,0,0,ids->ett.ctx_cmds,NULL,"[ Command History ]");
 
             for (c = ctx->cmds; c; c = c->next) {
                 proto_item* cmd_item = proto_tree_add_uint(history_tree,ids->hf.ctx_cmd,gcp_tvb,0,0,c->cmd->msg->framenum);
@@ -732,8 +731,7 @@ void gcp_analyze_msg(proto_tree* gcp_tree, packet_info* pinfo, tvbuff_t* gcp_tvb
         }
 
         if (( ctx_term = ctx->terms.next )) {
-            proto_item* terms_item = proto_tree_add_text(ctx_tree,gcp_tvb,0,0,"[ Terminations Used ]");
-            proto_tree* terms_tree = proto_item_add_subtree(terms_item,ids->ett.ctx_terms);
+            proto_tree* terms_tree = proto_tree_add_subtree(ctx_tree,gcp_tvb,0,0,ids->ett.ctx_terms,NULL,"[ Terminations Used ]");
 
             for (; ctx_term; ctx_term = ctx_term->next ) {
                 if ( ctx_term->term && ctx_term->term->str) {
index dbb7e7921579269fee549d2d03e46b167bb88aa1..d1d270eee19f7d75f39d3aed1a6bfe2a5a8534d2 100644 (file)
@@ -1296,7 +1296,7 @@ void add_oid_debug_subtree(oid_info_t* oid_info, proto_tree *tree) {
        static const char* key_types[] = {"OID_KEY_TYPE_WRONG","OID_KEY_TYPE_INTEGER",
                                                                                "OID_KEY_TYPE_FIXED_STRING","OID_KEY_TYPE_FIXED_BYTES","OID_KEY_TYPE_STRING",
                                                                                "OID_KEY_TYPE_BYTES","OID_KEY_TYPE_NSAP","OID_KEY_TYPE_OID","OID_KEY_TYPE_IPADDR"};
-       proto_item* pi = proto_tree_add_text(tree,NULL,0,0,
+       proto_item* pi = proto_tree_add_debug_text(tree,NULL,0,0,
        "OidInfo: Name='%s' sub-id=%u  kind=%s  hfid=%d",
        oid_info->name ? oid_info->name : "",
        oid_info->subid,
@@ -1306,7 +1306,7 @@ void add_oid_debug_subtree(oid_info_t* oid_info, proto_tree *tree) {
        oid_key_t* key;
 
        for(key = oid_info->key; key; key = key->next) {
-               proto_tree_add_text(pt,NULL,0,0,
+               proto_tree_add_debug_text(pt,NULL,0,0,
                "Key: name='%s' num_subids=%d type=%s",
                key->name,
                key->key_type <= OID_KEY_TYPE_IPADDR ? key_types[key->key_type] : "BROKEN"
@@ -1314,7 +1314,7 @@ void add_oid_debug_subtree(oid_info_t* oid_info, proto_tree *tree) {
        };
 
        if (oid_info->parent) {
-               pi = proto_tree_add_text(pt,NULL,0,0,"Parent:");
+               pi = proto_tree_add_debug_text(pt,NULL,0,0,"Parent:");
                pt = proto_item_add_subtree(pi,0);
                add_oid_debug_subtree(oid_info->parent, pt);
        }