summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-fcgi.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-08-07 08:36:30 -0400
committerAnders Broman <a.broman58@gmail.com>2014-08-08 05:51:52 +0000
commita22b7075f84b8faf83a3ef05e45ea6d922c5001f (patch)
tree519e874bc10d1231b0dd9632dd91dabbb11502ef /epan/dissectors/packet-fcgi.c
parent532a98dc8c827471e143c81517b7ebb321400f84 (diff)
downloadwireshark-a22b7075f84b8faf83a3ef05e45ea6d922c5001f.tar.gz
Eliminate proto_tree_add_text from some dissectors.
Change-Id: I6f1710a093fc548c718defa9b40ab68877ede977 Reviewed-on: https://code.wireshark.org/review/3470 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-fcgi.c')
-rw-r--r--epan/dissectors/packet-fcgi.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/epan/dissectors/packet-fcgi.c b/epan/dissectors/packet-fcgi.c
index fec38bafc8..a7ce950b62 100644
--- a/epan/dissectors/packet-fcgi.c
+++ b/epan/dissectors/packet-fcgi.c
@@ -46,9 +46,11 @@ static int hf_fcgi_begin_request_flags = -1;
static int hf_fcgi_begin_request_keep_conn = -1;
static int hf_fcgi_end_request_app_status = -1;
static int hf_fcgi_end_request_protocol_status = -1;
+static int hf_fcgi_nv_name = -1;
static int ett_fcgi = -1;
static int ett_fcgi_begin_request = -1;
+static int ett_fcgi_abort_request = -1;
static int ett_fcgi_end_request = -1;
static int ett_fcgi_params = -1;
@@ -133,9 +135,11 @@ dissect_nv_pairs(tvbuff_t *tvb, proto_tree *fcgi_tree, gint offset, guint16 len)
value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, valuelen, ENC_ASCII);
offset += valuelen;
- proto_tree_add_text(fcgi_tree, tvb, start_offset, offset - start_offset, "%s = %s", name, value);
+ proto_tree_add_string_format(fcgi_tree, hf_fcgi_nv_name, tvb, start_offset, offset - start_offset,
+ name, "%s = %s", name, value);
} else {
- proto_tree_add_text(fcgi_tree, tvb, start_offset, offset - start_offset, "%s", name);
+ proto_tree_add_string_format(fcgi_tree, hf_fcgi_nv_name, tvb, start_offset, offset - start_offset,
+ name, "%s", name);
}
}
}
@@ -162,7 +166,7 @@ dissect_begin_request(tvbuff_t *tvb, proto_tree *fcgi_tree, gint offset, guint16
static void
dissect_abort_request(tvbuff_t *tvb, proto_tree *fcgi_tree, gint offset, guint16 len)
{
- proto_tree_add_text(fcgi_tree, tvb, offset, len, "Abort Request:");
+ proto_tree_add_subtree(fcgi_tree, tvb, offset, len, ett_fcgi_abort_request, NULL, "Abort Request:");
return;
}
@@ -366,11 +370,15 @@ proto_register_fcgi(void)
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_fcgi_end_request_protocol_status,
{ "Protocol Status", "fcgi.end_request.protocol_status",
- FT_UINT32, BASE_DEC, VALS(protocol_statuses), 0x0, NULL, HFILL } }
+ FT_UINT32, BASE_DEC, VALS(protocol_statuses), 0x0, NULL, HFILL } },
+ { &hf_fcgi_nv_name,
+ { "NV Pair name", "fcgi.nv_name",
+ FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
};
static gint *ett[] = {
&ett_fcgi,
&ett_fcgi_begin_request,
+ &ett_fcgi_abort_request,
&ett_fcgi_end_request,
&ett_fcgi_params
};