]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/NNTP.pm
watch: block signals before fork on non-signalfd/kevent systems
[public-inbox.git] / lib / PublicInbox / NNTP.pm
index 9d91544abd309d7186ceae91e338129a42f1e361..595a4046d4fccff1249784aca9d022c656cb9e08 100644 (file)
@@ -523,6 +523,7 @@ sub blob_cb { # called by git->cat_async via git_async_cat
        if (!defined($oid)) {
                # it's possible to have TOCTOU if an admin runs
                # public-inbox-(edit|purge), just move onto the next message
+               warn "E: $smsg->{blob} missing in $self->{ng}->{inboxdir}\n";
                return $self->requeue;
        } elsif ($smsg->{blob} ne $oid) {
                $self->close;
@@ -580,11 +581,11 @@ sub cmd_body ($;$) {
 
 sub cmd_stat ($;$) {
        my ($self, $art) = @_;
-       my $r = art_lookup($self, $art);
-       return $r unless ref $r;
-       my ($n, $mid) = @$r;
+       my $smsg = art_lookup($self, $art); # art may be msgid
+       return $smsg unless ref $smsg;
+       $art = $smsg->{num};
        set_art($self, $art);
-       "223 $n <$mid> article retrieved - request text separately";
+       "223 $art <$smsg->{mid}> article retrieved - request text separately";
 }
 
 sub cmd_ihave ($) { '435 article not wanted - do not send it' }