dovecot-2.0: lib-lda: Added mail_deliver_hook_set()
dovecot at dovecot.org
dovecot at dovecot.org
Thu Aug 12 15:51:20 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/a75589746450
changeset: 11979:a75589746450
user: Timo Sirainen <tss at iki.fi>
date: Thu Aug 12 13:50:01 2010 +0100
description:
lib-lda: Added mail_deliver_hook_set()
diffstat:
src/lib-lda/mail-deliver.c | 8 ++++++++
src/lib-lda/mail-deliver.h | 4 ++++
2 files changed, 12 insertions(+), 0 deletions(-)
diffs (27 lines):
diff -r 8c6912bc0db0 -r a75589746450 src/lib-lda/mail-deliver.c
--- a/src/lib-lda/mail-deliver.c Wed Aug 11 18:48:30 2010 +0100
+++ b/src/lib-lda/mail-deliver.c Thu Aug 12 13:50:01 2010 +0100
@@ -296,3 +296,11 @@
}
return ret;
}
+
+deliver_mail_func_t *mail_deliver_hook_set(deliver_mail_func_t *new_hook)
+{
+ deliver_mail_func_t *old_hook = deliver_mail;
+
+ deliver_mail = new_hook;
+ return old_hook;
+}
diff -r 8c6912bc0db0 -r a75589746450 src/lib-lda/mail-deliver.h
--- a/src/lib-lda/mail-deliver.h Wed Aug 11 18:48:30 2010 +0100
+++ b/src/lib-lda/mail-deliver.h Thu Aug 12 13:50:01 2010 +0100
@@ -69,4 +69,8 @@
int mail_deliver(struct mail_deliver_context *ctx,
struct mail_storage **storage_r);
+/* Sets the deliver_mail hook and returns the previous hook,
+ which the new_hook should call if it's non-NULL. */
+deliver_mail_func_t *mail_deliver_hook_set(deliver_mail_func_t *new_hook);
+
#endif
More information about the dovecot-cvs
mailing list