[Bps-public-commit] r9473 - in Net-Server-IMAP: . lib/Net/Server/IMAP

alexmv at bestpractical.com alexmv at bestpractical.com
Fri Oct 26 15:25:00 EDT 2007


Author: alexmv
Date: Fri Oct 26 15:24:59 2007
New Revision: 9473

Modified:
   Net-Server-IMAP/   (props changed)
   Net-Server-IMAP/lib/Net/Server/IMAP.pm
   Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm
   Net-Server-IMAP/lib/Net/Server/IMAP/Mailbox.pm

Log:
 r24079 at zoq-fot-pik:  chmrr | 2007-10-26 15:24:40 -0400
  * Auth can change within one packet, so move the auth "local" to
    depeer in the loop
  * add_message should return the message


Modified: Net-Server-IMAP/lib/Net/Server/IMAP.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP.pm	Fri Oct 26 15:24:59 2007
@@ -73,8 +73,6 @@
 
                     # Process socket
                     local $Net::Server::IMAP::Server = $self;
-                    local $self->{connection} = $self->connections->{ $fh->fileno };
-                    local $self->{auth}       = $self->connections->{ $fh->fileno }->auth;
                     local $SIG{PIPE} = sub { warn "Broken pipe\n"; $self->connections->{ $fh->fileno}->close };
                     $self->connections->{ $fh->fileno }->handle_lines;
                 }

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	Fri Oct 26 15:24:59 2007
@@ -38,6 +38,9 @@
     my $self = shift;
     my $content = shift;
 
+    local $self->server->{connection} = $self;
+    local $self->server->{auth} = $self->auth;
+
     $self->log("C(@{[$self->io_handle->peerport]},@{[$self->auth ? $self->auth->user : '???']},@{[$self->is_selected ? $self->selected->full_path : 'unselected']}): $content");
 
     if ( $self->pending ) {
@@ -232,7 +235,7 @@
 
     if ($self->io_handle) {
         $self->io_handle->blocking(1);
-        $self->io_handle->print($msg);
+        $self->io_handle->print($msg) or warn "********************** $!\n";
         $self->io_handle->blocking(0);
 
         $self->log("S(@{[$self->io_handle->peerport]},@{[$self->auth ? $self->auth->user : '???']},@{[$self->is_selected ? $self->selected->full_path : 'unselected']}): $msg");

Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Mailbox.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Mailbox.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Mailbox.pm	Fri Oct 26 15:24:59 2007
@@ -74,6 +74,7 @@
         push @{$c->temporary_messages}, $message;
         $c->temporary_sequence_map->{$message} = scalar @{$c->temporary_messages};
     }
+    return $message;
 }
 
 sub get_uids {



More information about the Bps-public-commit mailing list