From c9b9dd690bac14b7402283e178d4c3b00f200d41 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 27 Apr 2011 02:54:44 +0000 Subject: Create a new frame_data_sequence data type; it represents a dense sequence of frame_data structures, indexed by the frame number. Extract the relevant bits of the capture_file data structure and move them to the frame_data_sequence, and move the relevant code from cfile.c and tweak it to handle frame_data_sequence structures. Have a possibly-null pointer to a frame_data_sequence structure in the capture_file structure; if it's null, we aren't keeping a sequence of frame_data structures (we don't keep that sequence when we're doing one-pass processing in TShark). Nothing in libwireshark should care about a capture_file structure; get rid of some unnecessary includes of cfile.h. svn path=/trunk/; revision=36881 --- summary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'summary.c') diff --git a/summary.c b/summary.c index 36a59e0e30..7686e04bbc 100644 --- a/summary.c +++ b/summary.c @@ -109,12 +109,12 @@ summary_fill_in(capture_file *cf, summary_tally *st) /* initialize the tally */ if (cf->count != 0) { - first_frame = cap_file_find_fdata(cf, 1); + first_frame = frame_data_sequence_find(cf->frames, 1); st->start_time = nstime_to_sec(&first_frame->abs_ts); st->stop_time = nstime_to_sec(&first_frame->abs_ts); for (framenum = 1; framenum <= cf->count; framenum++) { - cur_frame = cap_file_find_fdata(cf, framenum); + cur_frame = frame_data_sequence_find(cf->frames, framenum); tally_frame_data(cur_frame, st); } } -- cgit v1.2.1