diff options
author | Guy Harris <gharris@sonic.net> | 2021-07-07 22:43:29 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-07-08 00:05:35 -0700 |
commit | dd5907d2a3f6d0ac572a76770b43422b0b82c2ab (patch) | |
tree | 88c706f42fc5b21ee0f9d12e949a02f16651a554 /epan/packet.c | |
parent | 6dfa2cb0ae4f15d171da8cf77f2a6e11d35d0d86 (diff) |
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".
Diffstat (limited to 'epan/packet.c')
-rw-r--r-- | epan/packet.c | 18 |
1 files changed, 12 insertions, 6 deletions
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; |