james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gautam Mani <g_m...@vsnl.com>
Subject Re: Pop3 Handler patch
Date Sat, 10 Mar 2001 11:57:06 GMT
Hi,
	I had sent this patch - but did not get any response from the list.
I am sending in the mail again (with a new diff).

Bye,
Gautam

On Mon, Mar 05, 2001 at 10:28:15PM +0530, Gautam Mani wrote:
> Date: Mon, 5 Mar 2001 22:28:15 +0530
> From: Gautam Mani <g_mani@vsnl.com>
> To: Java Apache Mail Server <james-dev@jakarta.apache.org>
> Subject: Pop3 Handler patch
> 
> Hi,
> There is a small bug in the POP3Handler where it doesn't quite follow the
> standard. A deleted message is allowed to be deleted again.
> Here is the diff:
> 
 
Index: POP3Handler.java
===================================================================
RCS file:
/home/cvspublic/jakarta-james/src/org/apache/james/pop3server/POP3Handler.java,v
retrieving revision 1.35
diff -u -r1.35 POP3Handler.java
--- POP3Handler.java    2001/03/06 01:35:12     1.35
+++ POP3Handler.java    2001/03/10 11:53:08
@@ -334,8 +334,13 @@
                     return true;
                 }
                 try {
-                    userMailbox.setElementAt(DELETED, num);
-                    out.println(OK_RESPONSE + " Message removed");
+                    MailImpl mc = (MailImpl) userMailbox.elementAt(num);
+                    if (mc == DELETED) {
+                        out.println(ERR_RESPONSE + " Message (" + num + ") deleted.");
+                    } else {
+                        userMailbox.setElementAt(DELETED, num);
+                        out.println(OK_RESPONSE + " Message removed");
+                    }
                 } catch (ArrayIndexOutOfBoundsException iob) {
                     out.println(ERR_RESPONSE + " Message (" + num + ") does not exist.");
                 }



-- 
uptime: 5:20pm up 1:57, 4 users, load average: 0.54, 0.42, 0.26
PGP Key: 0x7586EF34

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message