[1021] in BarnOwl Developers
[D-O-H] r1007 - branches/barnowl_sqlite/owl
daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:12:12 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@nelhage.com
To: dirty-owl-hackers@MIT.EDU
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Wed, 2 Apr 2008 00:42:25 -0400 (EDT)
Author: nelhage
Date: 2008-04-02 00:42:25 -0400 (Wed, 02 Apr 2008)
New Revision: 1007
Modified:
branches/barnowl_sqlite/owl/perlwrap.pm
Log:
Add some debug spew and fix stupid bugs in fill_back and
recalculate_around.
Modified: branches/barnowl_sqlite/owl/perlwrap.pm
===================================================================
--- branches/barnowl_sqlite/owl/perlwrap.pm 2008-04-02 04:42:24 UTC (rev 1006)
+++ branches/barnowl_sqlite/owl/perlwrap.pm 2008-04-02 04:42:25 UTC (rev 1007)
@@ -451,6 +451,8 @@
sub recalculate_around {
my $self = shift;
my $where = shift;
+ $self->recalculate;
+ BarnOwl::debug("recalulate @{[$self->get_filter]} around $where");
if($where == 0) {
$self->{at_start} = 1;
$self->fill_forward(0);
@@ -468,13 +470,15 @@
sub fill_back {
my $self = shift;
my $pos = shift || $self->messages->[0] - 1;
+ BarnOwl::debug("Fill back from $pos...");
my $ml = BarnOwl::message_list();
return if $self->at_start;
- $ml->iterate_begin($pos, 1);
+ $ml->iterate_begin($pos, 0);
my $count = 0;
while($count < $FILL_STEP) {
my $m = $ml->iterate_next;
unless(defined $m) {
+ BarnOwl::debug("Hit start in fill_back.");
$self->{at_start} = 1;
last;
}
@@ -488,6 +492,7 @@
}
sub fill_forward {
+ BarnOwl::debug("Fill forward...");
my $self = shift;
my $pos = shift || $self->messages->[-1] + 1;
my $ml = BarnOwl::message_list();
@@ -497,6 +502,7 @@
while($count < $FILL_STEP) {
my $m = $ml->iterate_next;
unless(defined $m) {
+ BarnOwl::debug("Hit end in fill_forward.");
$self->{at_end} = 1;
last;
}