Skip to content

Commit

Permalink
Added more debug output.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 20, 2009
1 parent 65245cc commit 627365a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions archive_jabber.pl
Expand Up @@ -272,14 +272,18 @@ sub signal_catcher {
}

if (not defined $startids{$with}) {
dbgprint("Flushing new per-user startid for '$with'\n");
if (not flush_startid($with, 0)) {
fail("didn't flush new startid for '$with'");
}
}

if ( (time() - make_timestamp($utc, 'UTC')) < $gaptime ) {
dbgprint("timestamp '$utc' is less than $gaptime seconds old.\n");
$startid = ($msgid-1) if ((not defined $startid) or ($msgid < $startid));
if ((not defined $startid) or ($msgid < $startid)) {
$startid = ($msgid-1);
dbgprint("forcing global startid to $startid\n");
}
# trash this conversation, it might still be ongoing.
flush_conversation(1) if ($with eq $lastwith);
next;
Expand Down Expand Up @@ -367,7 +371,12 @@ sub signal_catcher {
$sth->finish();
$link->disconnect();

$startid = $newestmsgid if (not defined $startid);
if (defined $startid) {
dbgprint("Final startid is $startid\n");
} else {
$startid = $newestmsgid;
dbgprint("No definite global startid; using $startid\n");
}

flush_conversation(0);

Expand Down

0 comments on commit 627365a

Please sign in to comment.