httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From soc-r...@apache.org
Subject svn commit: r369924 - in /httpd/mod_smtpd/trunk/src: mod_smtpd.h smtp_core.c smtp_protocol.c
Date Tue, 17 Jan 2006 21:34:20 GMT
Author: soc-rian
Date: Tue Jan 17 13:34:18 2006
New Revision: 369924

URL: http://svn.apache.org/viewcvs?rev=369924&view=rev
Log:
Removed assumption of SMTP protocol (so modules can detect whether helo
or ehlo have been received or not)


Modified:
    httpd/mod_smtpd/trunk/src/mod_smtpd.h
    httpd/mod_smtpd/trunk/src/smtp_core.c
    httpd/mod_smtpd/trunk/src/smtp_protocol.c

Modified: httpd/mod_smtpd/trunk/src/mod_smtpd.h
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/src/mod_smtpd.h?rev=369924&r1=369923&r2=369924&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/src/mod_smtpd.h (original)
+++ httpd/mod_smtpd/trunk/src/mod_smtpd.h Tue Jan 17 13:34:18 2006
@@ -66,6 +66,7 @@
 } smtpd_trans_state;
 
 typedef enum {
+    SMTPD_PROTOCOL_UNKNOWN,
     SMTPD_PROTOCOL_SMTP,
     SMTPD_PROTOCOL_ESMTP
 } smtpd_protocol_type;

Modified: httpd/mod_smtpd/trunk/src/smtp_core.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/src/smtp_core.c?rev=369924&r1=369923&r2=369924&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/src/smtp_core.c (original)
+++ httpd/mod_smtpd/trunk/src/smtp_core.c Tue Jan 17 13:34:18 2006
@@ -142,7 +142,7 @@
     scr->bb_in = apr_brigade_create(scr->p, scr->c->bucket_alloc);
     scr->bb_out = apr_brigade_create(scr->p, scr->c->bucket_alloc);
 
-    scr->protocol_type = SMTPD_PROTOCOL_SMTP;
+    scr->protocol_type = SMTPD_PROTOCOL_UNKNOWN;
     scr->helo = apr_palloc(scr->p, 256);
 
     /* create transaction rec */

Modified: httpd/mod_smtpd/trunk/src/smtp_protocol.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/src/smtp_protocol.c?rev=369924&r1=369923&r2=369924&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/src/smtp_protocol.c (original)
+++ httpd/mod_smtpd/trunk/src/smtp_protocol.c Tue Jan 17 13:34:18 2006
@@ -637,7 +637,7 @@
     apr_pool_t *p;
     char *received_from;
     char *protocol =
-      scr->protocol_type == SMTPD_PROTOCOL_SMTP ? "SMTP" : "ESMTP";
+      scr->protocol_type == SMTPD_PROTOCOL_ESMTP ? "ESMTP" : "SMTP";
     /* XXX: For now we mandatorily do a DNS lookup,
        make it so we can do this according to the 
        config rule "HostnameLookups" */
@@ -647,7 +647,9 @@
 
     apr_pool_create(&p, scr->p);
 
-    heloed = apr_psprintf(p, "(HELO %s) ", scr->helo);
+    heloed = 
+      scr->protocol_type == SMTPD_PROTOCOL_UNKNOWN ?
+      "" : apr_psprintf(p, "(HELO %s) ", scr->helo);
 
     apr_time_exp_lt(&t, apr_time_now());
 



Mime
View raw message