]> code.citadel.org Git - citadel.git/commitdiff
* serv_smtp.c: remember whether we're SMTP or LMTP across a RSET command.
authorArt Cancro <ajc@citadel.org>
Fri, 12 Sep 2003 15:48:55 +0000 (15:48 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 12 Sep 2003 15:48:55 +0000 (15:48 +0000)
citadel/ChangeLog
citadel/serv_smtp.c

index ccd61176d8a1c75b50326fced5b58e3519c4ac15..8c38493acb908a952bd28e9a1d997485c37ef443 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 610.15  2003/09/12 15:48:55  ajc
+ * serv_smtp.c: remember whether we're SMTP or LMTP across a RSET command.
+
  Revision 610.14  2003/09/09 02:42:28  ajc
  * Documentation update for LMTP
 
@@ -5018,3 +5021,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index e2d1b93b06f51be10adc02bbf8b13bf0147c00c5..e6be064ca81d5543f33bde1527f545d20dbba7ea 100644 (file)
@@ -336,6 +336,15 @@ void smtp_expn(char *argbuf) {
  * be sure to phree() them first!
  */
 void smtp_rset(void) {
+       int is_lmtp;
+
+       /*
+        * Our entire SMTP state is discarded when a RSET command is issued,
+        * but we need to preserve this one little piece of information, so
+        * we save it for later.
+        */
+       is_lmtp = SMTP->is_lmtp;
+
        memset(SMTP, 0, sizeof(struct citsmtp));
 
        /*
@@ -349,6 +358,11 @@ void smtp_rset(void) {
         * }
         */
 
+       /*
+        * Reinstate this little piece of information we saved (see above).
+        */
+       SMTP->is_lmtp = is_lmtp;
+
        cprintf("250 2.0.0 Zap!\r\n");
 }