[Bps-public-commit] r11846 - in Net-IMAP-Server: lib/Net/IMAP/Server/Command
alexmv at bestpractical.com
alexmv at bestpractical.com
Wed Apr 23 15:26:32 EDT 2008
Author: alexmv
Date: Wed Apr 23 15:25:19 2008
New Revision: 11846
Modified:
Net-IMAP-Server/ (props changed)
Net-IMAP-Server/lib/Net/IMAP/Server/Command/Copy.pm
Net-IMAP-Server/lib/Net/IMAP/Server/Command/Store.pm
Net-IMAP-Server/lib/Net/IMAP/Server/Command/Uid.pm
Log:
r30108 at kohr-ah: chmrr | 2008-04-23 15:23:57 -0400
* 'cede' more for multiple-message actions
Modified: Net-IMAP-Server/lib/Net/IMAP/Server/Command/Copy.pm
==============================================================================
--- Net-IMAP-Server/lib/Net/IMAP/Server/Command/Copy.pm (original)
+++ Net-IMAP-Server/lib/Net/IMAP/Server/Command/Copy.pm Wed Apr 23 15:25:19 2008
@@ -33,7 +33,11 @@
return $self->no_command("Permission denied") if grep {not $_->copy_allowed($mailbox)} @messages;
- my @new = map {$_->copy($mailbox)} @messages;
+ my @new;
+ for my $m (@messages) {
+ push @new, $m->copy($mailbox);
+ cede;
+ }
my $sequence = join(",",map {$_->uid} @messages);
my $uids = join(",",map {$_->uid} @new);
$self->ok_command("[COPYUID @{[$mailbox->uidvalidity]} $sequence $uids] COPY COMPLETED");
Modified: Net-IMAP-Server/lib/Net/IMAP/Server/Command/Store.pm
==============================================================================
--- Net-IMAP-Server/lib/Net/IMAP/Server/Command/Store.pm (original)
+++ Net-IMAP-Server/lib/Net/IMAP/Server/Command/Store.pm Wed Apr 23 15:25:19 2008
@@ -31,7 +31,10 @@
my @messages = $self->connection->get_messages($messages);
$self->connection->ignore_flags(1) if $what =~ /\.SILENT$/i;
- $_->store( $what => $flags ) for @messages;
+ for my $m (@messages) {
+ $m->store( $what => $flags );
+ cede;
+ }
$self->connection->ignore_flags(0) if $what =~ /\.SILENT$/i;
$self->ok_completed();
Modified: Net-IMAP-Server/lib/Net/IMAP/Server/Command/Uid.pm
==============================================================================
--- Net-IMAP-Server/lib/Net/IMAP/Server/Command/Uid.pm (original)
+++ Net-IMAP-Server/lib/Net/IMAP/Server/Command/Uid.pm Wed Apr 23 15:25:19 2008
@@ -76,6 +76,7 @@
$m->store( $what => $flags );
$self->connection->untagged_fetch->{$self->connection->sequence($m)}{UID}++
unless $what =~ /\.SILENT$/i;
+ cede;
}
$self->connection->ignore_flags(0) if $what =~ /\.SILENT$/i;
@@ -96,7 +97,11 @@
my @messages = $self->connection->selected->get_uids($messages);
return $self->no_command("Permission denied") if grep {not $_->copy_allowed($mailbox)} @messages;
- my @new = map {$_->copy($mailbox)} @messages;
+ my @new;
+ for my $m (@messages) {
+ push @new, $m->copy($mailbox);
+ cede;
+ }
my $sequence = join(",",map {$_->uid} @messages);
my $uids = join(",",map {$_->uid} @new);
$self->ok_command("[COPYUID @{[$mailbox->uidvalidity]} $sequence $uids] COPY COMPLETED");
More information about the Bps-public-commit
mailing list