aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-frame.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-12-19 08:08:38 -0500
committerAnders Broman <a.broman58@gmail.com>2015-01-02 00:00:57 +0000
commit07c9492b8d40ed766074679f86c49780277af002 (patch)
tree5a0c6f5d078872b58a7eac1469ce6d2401bf2792 /epan/dissectors/packet-frame.c
parentf384fa07f945fd73e3f0088c19d640a8c534a791 (diff)
Remove pkt_comment member from packet_info structure.
Change-Id: Ifd3d201a09944e3fc36188f891ea8a584886101d Reviewed-on: https://code.wireshark.org/review/5884 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-frame.c')
-rw-r--r--epan/dissectors/packet-frame.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index b8767108e1..0ac617a089 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -176,12 +176,9 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
proto_tree *comments_tree;
proto_item *item;
const gchar *cap_plurality, *frame_plurality;
- int file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_UNKNOWN;
+ frame_data_t *fr_data = (frame_data_t*)data;
tree=parent_tree;
- if (data != NULL) {
- file_type_subtype = GPOINTER_TO_INT(data);
- }
switch (pinfo->phdr->rec_type) {
@@ -251,14 +248,14 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
break;
}
- if (pinfo->pkt_comment) {
+ if (fr_data && fr_data->pkt_comment) {
item = proto_tree_add_item(tree, proto_pkt_comment, tvb, 0, 0, ENC_NA);
comments_tree = proto_item_add_subtree(item, ett_comments);
comment_item = proto_tree_add_string_format(comments_tree, hf_comments_text, tvb, 0, 0,
- pinfo->pkt_comment, "%s",
- pinfo->pkt_comment);
+ fr_data->pkt_comment, "%s",
+ fr_data->pkt_comment);
expert_add_info_format(pinfo, comment_item, &ei_comments_text,
- "%s", pinfo->pkt_comment);
+ "%s", fr_data->pkt_comment);
}
@@ -507,13 +504,21 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
case REC_TYPE_FT_SPECIFIC_EVENT:
case REC_TYPE_FT_SPECIFIC_REPORT:
- if (!dissector_try_uint(wtap_fts_rec_dissector_table, file_type_subtype,
- tvb, pinfo, parent_tree)) {
+ {
+ int file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_UNKNOWN;
+
+ if (fr_data) {
+ file_type_subtype = fr_data->file_type_subtype;
+ }
+
+ if (!dissector_try_uint(wtap_fts_rec_dissector_table, file_type_subtype,
+ tvb, pinfo, parent_tree)) {
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
- col_add_fstr(pinfo->cinfo, COL_INFO, "WTAP_ENCAP = %d",
- file_type_subtype);
- call_dissector(data_handle,tvb, pinfo, parent_tree);
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
+ col_add_fstr(pinfo->cinfo, COL_INFO, "WTAP_ENCAP = %d",
+ file_type_subtype);
+ call_dissector(data_handle,tvb, pinfo, parent_tree);
+ }
}
break;
}