projects
/
twirssi-net-twitter-lite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2931223
)
Fix typo in binmode. Also, try to make sure the last_poll id never decreases
author
Dan Boger
<zigdon@irc.peeron.com>
Tue, 11 Aug 2009 05:50:40 +0000
(22:50 -0700)
committer
Dan Boger
<zigdon@irc.peeron.com>
Tue, 11 Aug 2009 05:50:40 +0000
(22:50 -0700)
twirssi.pl
patch
|
blob
|
history
diff --git
a/twirssi.pl
b/twirssi.pl
index 1f0f895067c53f1d30a9f1512c00735aaa5f61b3..aca557c52b0f5c426f4030b9ae2991abc4e739bd 100644
(file)
--- a/
twirssi.pl
+++ b/
twirssi.pl
@@
-1032,7
+1032,7
@@
sub monitor_child {
# pretend
if ( open FILE, $filename ) {
# pretend
if ( open FILE, $filename ) {
- bin
d
mode FILE, ":utf8";
+ binmode FILE, ":utf8";
my @lines;
my %new_cache;
while (<FILE>) {
my @lines;
my %new_cache;
while (<FILE>) {
@@
-1163,8
+1163,16
@@
sub monitor_child {
}
if (/^-- (\d+)$/) {
}
if (/^-- (\d+)$/) {
- ($new_last_poll) = ($1);
- last;
+ $new_last_poll = $1;
+ if ( $new_last_poll >= $last_poll ) {
+ last;
+ } else {
+ print "Impossible! ",
+ "new_last_poll=$new_last_poll < last_poll=$last_poll!"
+ if &debug;
+ undef $new_last_poll;
+ next;
+ }
}
my ( $f, $t ) = split ' ', $_;
$nicks{$f} = $friends{$f} = $t;
}
my ( $f, $t ) = split ' ', $_;
$nicks{$f} = $friends{$f} = $t;