You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by so...@apache.org on 2005/08/23 05:38:57 UTC
svn commit: r239318 - /httpd/mod_smtpd/trunk/smtp_core.c
Author: soc-rian
Date: Mon Aug 22 20:38:56 2005
New Revision: 239318
URL: http://svn.apache.org/viewcvs?rev=239318&view=rev
Log:
Made smtpd_run_queue a RUN_ALL hook (so multiple plugins can handle the message)
Modified:
httpd/mod_smtpd/trunk/smtp_core.c
Modified: httpd/mod_smtpd/trunk/smtp_core.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/smtp_core.c?rev=239318&r1=239317&r2=239318&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/smtp_core.c (original)
+++ httpd/mod_smtpd/trunk/smtp_core.c Mon Aug 22 20:38:56 2005
@@ -47,13 +47,15 @@
/* Implement 'smtpd_run_unrecognized_command'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode,
unrecognized_command,
- (smtpd_conn_rec *scr, smtpd_return_data *in,
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in,
char *command, char *data),
(scr, in, command, data),
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_connect'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode, connect,
- (smtpd_conn_rec *scr, smtpd_return_data *in),
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in),
(scr, in),
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_reset_transaction'. */
@@ -64,55 +66,59 @@
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_helo'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode, helo,
- (smtpd_conn_rec *scr, smtpd_return_data *in,
- char *str),
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in, char *str),
(scr, in, str),
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_ehlo'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode, ehlo,
- (smtpd_conn_rec *scr, smtpd_return_data *in,
- char *str),
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in, char *str),
(scr, in, str),
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_mail'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode, mail,
- (smtpd_conn_rec *scr, smtpd_return_data *in,
- char *str),
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in, char *str),
(scr, in, str),
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_rcpt'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode, rcpt,
- (smtpd_conn_rec *scr, smtpd_return_data *in,
- char *str),
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in, char *str),
(scr, in, str),
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_vrfy'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode, vrfy,
- (smtpd_conn_rec *scr, smtpd_return_data *in,
- char *str),
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in, char *str),
(scr, in, str),
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_quit'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode, quit,
- (smtpd_conn_rec *scr, smtpd_return_data *in),
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in),
(scr, in),
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_data'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode, data,
- (smtpd_conn_rec *scr, smtpd_return_data *in),
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in),
(scr, in),
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_data_post'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode,
data_post,
- (smtpd_conn_rec *scr, smtpd_return_data *in),
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in),
(scr, in),
SMTPD_DECLINED, SMTPD_DECLINED);
/* Implement 'smtpd_run_queue'. */
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(smtpd, SMTPD, smtpd_retcode, queue,
- (smtpd_conn_rec *scr, smtpd_return_data *in),
+ (smtpd_conn_rec *scr,
+ smtpd_return_data *in),
(scr, in),
- SMTPD_DECLINED, SMTPD_DECLINED);
+ SMTPD_DECLINED, SMTPD_OK);
/* public methods */
/* functions other modules can use */
@@ -127,7 +133,8 @@
/* how to reset the transaction */
SMTPD_DECLARE_NONSTD(void)
-smtpd_reset_transaction(smtpd_conn_rec *scr) {
+smtpd_reset_transaction(smtpd_conn_rec *scr)
+{
/* REVIEW: don't know whether to run clear request first
* then run reset hooks, or run reset hooks then clear request
* depends on whether hooks want to save info before it gets cleared out
@@ -232,7 +239,8 @@
}
void
-smtpd_clear_trans_rec(smtpd_trans_rec *str) {
+smtpd_clear_trans_rec(smtpd_trans_rec *str)
+{
apr_pool_clear(str->p);
str->state_vector = SMTPD_STATE_GOT_NOTHING;
str->tfp = NULL;
Re: svn commit: r239318 - /httpd/mod_smtpd/trunk/smtp_core.c
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
soc-rian@apache.org wrote:
> Author: soc-rian
> Date: Mon Aug 22 20:38:56 2005
> New Revision: 239318
>
> URL: http://svn.apache.org/viewcvs?rev=239318&view=rev
> Log:
> Made smtpd_run_queue a RUN_ALL hook (so multiple plugins can handle the message)
This is another example of a change that makes numerous unrelated
whitespace changes which obscure the actual change in functionality,
making it difficult to read. I don't have any particular objection to
the whitespace changes, but they should have been made in a separate
commit. This kind of thing only takes a little bit of effort on your
part, but it makes it far far easier (and thus more likely) for other
developers to review the change and verify that it is correct.
-garrett