]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchidxpart: force integers into add_message
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Mon, 26 Feb 2018 23:02:13 +0000 (23:02 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Wed, 28 Feb 2018 23:05:30 +0000 (23:05 +0000)
Make data passed via Storable to the skeleton worker
a little neater.

lib/PublicInbox/SearchIdxPart.pm

index ee79e08e1cda02dd37bebcb26a5736a902694490..477a4f979624b9f8998327c5399f79b64c9ca6ef 100644 (file)
@@ -59,7 +59,8 @@ sub partition_worker_loop ($$$) {
                        my $n = read($r, my $msg, $len) or die "read: $!\n";
                        $n == $len or die "short read: $n != $len\n";
                        my $mime = PublicInbox::MIME->new(\$msg);
-                       $self->add_message($mime, $len, $artnum, $object_id);
+                       $artnum = int($artnum);
+                       $self->add_message($mime, $n, $artnum, $object_id);
                }
        }
        warn "$$ still in transaction\n" if $txn;