|
From: <jgr...@us...> - 2003-07-09 21:15:42
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv10869/UI
Modified Files:
HTML.pm
Log Message:
Fix problem where the last message up the pipe from a proxy could get lost
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.178
retrieving revision 1.179
diff -C2 -d -r1.178 -r1.179
*** HTML.pm 9 Jul 2003 18:18:23 -0000 1.178
--- HTML.pm 9 Jul 2003 21:15:40 -0000 1.179
***************
*** 289,294 ****
if ( $type eq 'NEWFL' ) {
$self->new_history_file__( $message );
- $self->{need_resort__} = 1;
}
--- 289,294 ----
if ( $type eq 'NEWFL' ) {
+ $self->log_( "Got NEWFL for $message" );
$self->new_history_file__( $message );
}
***************
*** 2315,2318 ****
--- 2315,2329 ----
my ( $self, $filter, $search, $sort ) = @_;
+ # If the need_resort__ is set then we reindex the history indexes
+
+ if ( $self->{need_resort__} == 1 ) {
+ my $i = 0;
+
+ foreach my $key (sort compare_mf keys %{$self->{history__}}) {
+ $self->{history__}{$key}{index} = $i;
+ $i += 1;
+ }
+ }
+
# Place entries in the history_keys array based on three critera:
#
***************
*** 2534,2537 ****
--- 2545,2549 ----
$self->{history_invalid__} = 0;
+ $self->{need_resort__} = 0;
$self->sort_filter_history( '', '', '' );
}
***************
*** 2617,2621 ****
$self->{history__}{$file}{cull} = 0;
! $index = $self->history_size() if ( !defined( $index ) );
$self->{history__}{$file}{index} = $index;
}
--- 2629,2637 ----
$self->{history__}{$file}{cull} = 0;
! if ( !defined( $index ) ) {
! $index = 0;
! $self->{need_resort__} = 1;
! }
!
$self->{history__}{$file}{index} = $index;
}
|