Fix for 903510: pt-tcp-model throws an error in --type=requests mode on empty file

This commit is contained in:
Brian Fraser fraserb@gmail.com
2012-07-30 11:52:53 -03:00
parent 2f0812fb33
commit b93856a37d
3 changed files with 22 additions and 4 deletions

View File

@@ -1832,7 +1832,10 @@ sub parse_event {
if ( $self->{in_prg} ) {
die "Error: no more lines, but in_prg = $self->{in_prg}";
}
if ( $self->{t_start} < $self->{current_ts} ) {
if ( defined $self->{t_start}
&& defined $self->{current_ts}
&& $self->{t_start} < $self->{current_ts} )
{
PTDEBUG && _d("Returning event based on what's been seen");
return $self->make_event($self->{t_start}, $self->{current_ts});
}