- $n_partial = scalar(@$mids);
- push @partial, [ $cur, $mids ];
- }
-
- # can't find a partial match in current inbox, try the others:
- if (!$n_partial && length($mid) >= $MIN_PARTIAL_LEN) {
- foreach my $ibx (@ibx) {
- $srch = $ibx->search or next;
- $mids = search_partial($srch, $mid) or next;
- $n_partial += scalar(@$mids);
- push @partial, [ $ibx, $mids];
- last if $n_partial >= PARTIAL_MAX;
+ $ctx->{n_partial} = scalar(@$mids);
+ push @{$ctx->{partial}}, [ $cur, $mids ];
+ } elsif ($ctx->{again} && length($mid) >= $MIN_PARTIAL_LEN) {
+ bless $ctx, __PACKAGE__;
+ if ($ctx->{env}->{'pi-httpd.async'}) {
+ $ctx->event_step;
+ return;