[Bps-public-commit] r9387 - in Net-Server-IMAP: lib/Net/Server/IMAP lib/Net/Server/IMAP/Command
alexmv at bestpractical.com
alexmv at bestpractical.com
Sun Oct 21 13:10:04 EDT 2007
Author: alexmv
Date: Sun Oct 21 13:10:03 2007
New Revision: 9387
Modified:
Net-Server-IMAP/ (props changed)
Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm
Net-Server-IMAP/lib/Net/Server/IMAP/Command/Status.pm
Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm
Log:
r23798 at zoq-fot-pik: chmrr | 2007-10-21 13:08:20 -0400
* Fix STATUS, no really
* Fix parsing of "FOO ()" so it doesn't infinite loop (I want
defined-or)
* Be a little more forgiving of errors, so the entire server doesn't
go down.
Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm (original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm Sun Oct 21 13:10:03 2007
@@ -64,7 +64,7 @@
return $self->_parsed_options if not defined $str and not defined $self->options_str;
my @parsed;
- for my $term (grep {/\S/} split /($RE{delimited}{-delim=>'"'}|$RE{balanced}{-parens=>'()'}|\S+$RE{balanced}{-parens=>'()[]<>'}|\S+)/, $str || $self->options_str) {
+ for my $term (grep {/\S/} split /($RE{delimited}{-delim=>'"'}|$RE{balanced}{-parens=>'()'}|\S+$RE{balanced}{-parens=>'()[]<>'}|\S+)/, defined $str ? $str : $self->options_str) {
if ($term =~ /^$RE{delimited}{-delim=>'"'}{-keep}$/) {
push @parsed, $3;
} elsif ($term =~ /^$RE{balanced}{-parens=>'()'}$/) {
Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command/Status.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command/Status.pm (original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command/Status.pm Sun Oct 21 13:10:03 2007
@@ -28,7 +28,7 @@
my $self = shift;
my ( $name, $flags ) = $self->parsed_options;
- my $mailbox = $self->connection->model->lookup( $self->connection, $name );
+ my $mailbox = $self->connection->model->lookup( $name );
$mailbox->poll;
my %items;
Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm (original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm Sun Oct 21 13:10:03 2007
@@ -56,7 +56,13 @@
);
return if $handler->has_literal;
- $handler->run() if $handler->validate;
+ eval {
+ $handler->run() if $handler->validate;
+ };
+ if ($@) {
+ $handler->no_command("Server error");
+ $self->log($@);
+ }
}
sub close {
More information about the Bps-public-commit
mailing list