From 747a99fb5e4a3b829652c2c3693ac0575cd96dde Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Mon, 8 Aug 2011 13:06:44 +0100 Subject: Fixed bug in pop3 handling. --- lib/mauve/pop3_server.rb | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'lib/mauve/pop3_server.rb') diff --git a/lib/mauve/pop3_server.rb b/lib/mauve/pop3_server.rb index 25ee83c..e455591 100644 --- a/lib/mauve/pop3_server.rb +++ b/lib/mauve/pop3_server.rb @@ -113,38 +113,38 @@ module Mauve end def receive_data (data) - data.split(CRLF).each do |d| + data.split(CRLF).each do |cmd| break if error? - if d =~ Regexp.new('\A('+self.permitted_commands.join("|")+')\b') + if cmd =~ Regexp.new('\A('+self.permitted_commands.join("|")+')\b') case $1 when "QUIT" - do_process_quit data + do_process_quit cmd when "USER" - do_process_user data + do_process_user cmd when "PASS" - do_process_pass data + do_process_pass cmd when "STAT" - do_process_stat data + do_process_stat cmd when "LIST" - do_process_list data + do_process_list cmd when "RETR" - do_process_retr data + do_process_retr cmd when "DELE" - do_process_dele data + do_process_dele cmd when "NOOP" - do_process_noop data + do_process_noop cmd when "RSET" - do_process_rset data + do_process_rset cmd when "CAPA" - do_process_capa data + do_process_capa cmd when "UIDL" - do_process_uidl data + do_process_uidl cmd else - do_process_error data + do_process_error cmd end else - do_process_error data + do_process_error cmd end end end -- cgit v1.2.1