From dd5907d2a3f6d0ac572a76770b43422b0b82c2ab Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 7 Jul 2021 22:43:29 -0700 Subject: Consistently refer to blocks that have been modified as "modified". "User" sounds as if the blocks belong to the user; at most, the current user might have modified them directly, but they might also have, for example, run a Lua script that, unknown to them, modified comments. Also, a file might have "user comments" added by a previous user, who them wrote the file and and provided it to the current user. "Modified" seems a bit clearer than "changed". --- epan/packet.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'epan/packet.c') diff --git a/epan/packet.c b/epan/packet.c index 969c77b056..c2eb0c9c75 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -583,9 +583,12 @@ dissect_record(epan_dissect_t *edt, int file_type_subtype, frame_delta_abs_time(edt->session, fd, fd->frame_ref_num, &edt->pi.rel_ts); - /* pkt block use first user, later from rec */ - if (fd->has_user_block) { - frame_dissector_data.pkt_block = epan_get_user_block(edt->session, fd); + /* + * If the block has been modified, use the modified block, + * otherwise use the block from the file. + */ + if (fd->has_modified_block) { + frame_dissector_data.pkt_block = epan_get_modified_block(edt->session, fd); } else if (fd->has_phdr_block) { frame_dissector_data.pkt_block = rec->block; @@ -657,9 +660,12 @@ dissect_file(epan_dissect_t *edt, wtap_rec *rec, TRY { - /* pkt block use first user, later from rec */ - if (fd->has_user_block) { - file_dissector_data.pkt_block = epan_get_user_block(edt->session, fd); + /* + * If the block has been modified, use the modified block, + * otherwise use the block from the file. + */ + if (fd->has_modified_block) { + file_dissector_data.pkt_block = epan_get_modified_block(edt->session, fd); } else if (fd->has_phdr_block) { file_dissector_data.pkt_block = rec->block; -- cgit v1.2.3