diff options
author | Gerald Combs <gerald@wireshark.org> | 2004-08-19 14:35:55 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2004-08-19 14:35:55 +0000 |
commit | 76fd761686896013cfbe4d4e55004c6484639a75 (patch) | |
tree | 01bd72126040e0ebcbd9035c6eec1eb94cdf4619 /file.c | |
parent | 329415a52a460f4d6e70b35b04c88da1aea21150 (diff) | |
download | wireshark-76fd761686896013cfbe4d4e55004c6484639a75.tar.gz wireshark-76fd761686896013cfbe4d4e55004c6484639a75.tar.bz2 wireshark-76fd761686896013cfbe4d4e55004c6484639a75.zip |
As suggested by Guy: Have mark_frame() do nothing if the frame has
already been marked and have unmark_frame() do likewise. Don't mess
with the marked frame count in mark_all_frames().
Be a little more paranoid about the marked frame count in other places.
svn path=/trunk/; revision=11775
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -2776,9 +2776,11 @@ unselect_field(capture_file *cf) void mark_frame(capture_file *cf, frame_data *frame) { - frame->flags.marked = TRUE; - if (cf->count > cf->marked_count) - cf->marked_count++; + if (! frame->flags.marked) { + frame->flags.marked = TRUE; + if (cf->count > cf->marked_count) + cf->marked_count++; + } } /* @@ -2787,9 +2789,11 @@ mark_frame(capture_file *cf, frame_data *frame) void unmark_frame(capture_file *cf, frame_data *frame) { - frame->flags.marked = FALSE; - if (cf->marked_count > 0) - cf->marked_count--; + if (frame->flags.marked) { + frame->flags.marked = FALSE; + if (cf->marked_count > 0) + cf->marked_count--; + } } typedef struct { |