aboutsummaryrefslogtreecommitdiffstats
path: root/sharkd_session.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2022-07-09 12:34:15 -0400
committerJohn Thacker <johnthacker@gmail.com>2022-07-12 00:22:11 +0000
commit8ac995578c0a314fc1dc091d6f0fdc268b94da7c (patch)
tree8832a98dbec03cbda0d0477402279ecc0a59c4c8 /sharkd_session.c
parent58b29b8f742003121f206f4254d27701a8deafb5 (diff)
epan: Respect custom column resolved/unresolved status everywhere
Add a function to get the column text of the nth column, taking into account whether the column is resolved or unresolved. Use this function in the GUI, as well as in tshark, when writing PSML, exporting dissection to PSML, etc., instead of accessing col_data directly. This removes the direct accesses of col_data from outside column.c and column-utils.c Fix #18168.
Diffstat (limited to 'sharkd_session.c')
-rw-r--r--sharkd_session.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sharkd_session.c b/sharkd_session.c
index 7727d6206a..9d3443236a 100644
--- a/sharkd_session.c
+++ b/sharkd_session.c
@@ -1333,9 +1333,7 @@ sharkd_session_process_frames_cb(epan_dissect_t *edt, proto_tree *tree _U_,
sharkd_json_array_open("c");
for (int col = 0; col < cinfo->num_cols; ++col)
{
- const col_item_t *col_item = &cinfo->columns[col];
-
- sharkd_json_value_string(NULL, col_item->col_data);
+ sharkd_json_value_string(NULL, get_column_text(cinfo, col));
}
sharkd_json_array_close();
@@ -3483,9 +3481,7 @@ sharkd_session_process_frame_cb(epan_dissect_t *edt, proto_tree *tree, struct ep
sharkd_json_array_open("col");
for (col = 0; col < cinfo->num_cols; ++col)
{
- const col_item_t *col_item = &cinfo->columns[col];
-
- sharkd_json_value_string(NULL, col_item->col_data);
+ sharkd_json_value_string(NULL, get_column_text(cinfo, col));
}
sharkd_json_array_close();
}