$Log$
+ Revision 571.5 2000/05/11 03:08:47 ajc
+ * serv_smtp.c: clear the relevant state buffers after an SMTP DATA command
+ completes, allowing multiple messages in one session. Closes bug #58.
+
Revision 571.4 2000/04/24 03:36:43 ajc
* Removed references to strucmp() and struncmp(), replaced them with
strcasecmp() and strncasecmp() as we did in the server a while ago, and
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
+
*/
void smtp_rset(void) {
memset(SMTP, 0, sizeof(struct citsmtp));
+ if (SMTP_RECP != NULL) strcpy(SMTP_RECP, "");
if (CC->logged_in) logout(CC);
cprintf("250 Zap!\r\n");
}
+/*
+ * Clear out the portions of the state buffer that need to be cleared out
+ * after the DATA command finishes.
+ */
+void smtp_data_clear(void) {
+ strcpy(SMTP->from, "");
+ SMTP->number_of_recipients = 0;
+ SMTP->delivery_mode = 0;
+ SMTP->message_originated_locally = 0;
+ if (SMTP_RECP != NULL) strcpy(SMTP_RECP, "");
+}
+
/*
else {
cprintf("550 Internal delivery errors: %d\r\n", retval);
}
+
+ smtp_data_clear(); /* clear out the buffers now */
}