Don't look at packet or byte limits during the second pass of two-pass analysis.
The limits are enforced during the first pass, and frames that get dropped from the first pass for this reason aren't available to the second pass at all, so checking again is redundant. svn path=/trunk/; revision=51460
This commit is contained in:
parent
8c484c090b
commit
2161550470
12
tshark.c
12
tshark.c
|
@ -3048,7 +3048,6 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
|
|||
|
||||
if (perform_two_pass_analysis) {
|
||||
frame_data *fdata;
|
||||
int old_max_packet_count = max_packet_count;
|
||||
|
||||
/* Allocate a frame_data_sequence for all the frames. */
|
||||
cf->frames = new_frame_data_sequence();
|
||||
|
@ -3075,8 +3074,6 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
|
|||
* don't need after the sequential run-through of the packets. */
|
||||
postseq_cleanup_all_protocols();
|
||||
|
||||
max_packet_count = old_max_packet_count;
|
||||
|
||||
prev_dis = NULL;
|
||||
prev_cap = NULL;
|
||||
buffer_init(&buf, 1500);
|
||||
|
@ -3117,15 +3114,6 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
|
|||
exit(2);
|
||||
}
|
||||
}
|
||||
/* Stop reading if we have the maximum number of packets;
|
||||
* When the -c option has not been used, max_packet_count
|
||||
* starts at 0, which practically means, never stop reading.
|
||||
* (unless we roll over max_packet_count ?)
|
||||
*/
|
||||
if ( (--max_packet_count == 0) || (max_byte_count != 0 && data_offset >= max_byte_count)) {
|
||||
err = 0; /* This is not an error */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue