Mercurial > dovecot > core-2.2
changeset 1646:a7c742b940e5 HEAD
Added pop3 hooks
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 26 Jul 2003 21:29:02 +0300 |
parents | c846d6735042 |
children | d6288ae1a71b |
files | src/pop3/client.c src/pop3/common.h src/pop3/main.c |
diffstat | 3 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pop3/client.c Sat Jul 26 21:24:00 2003 +0300 +++ b/src/pop3/client.c Sat Jul 26 21:29:02 2003 +0300 @@ -139,6 +139,8 @@ i_assert(my_client == NULL); my_client = client; + if (hook_client_created != NULL) + hook_client_created(&client); return client; }
--- a/src/pop3/common.h Sat Jul 26 21:24:00 2003 +0300 +++ b/src/pop3/common.h Sat Jul 26 21:29:02 2003 +0300 @@ -10,4 +10,7 @@ extern struct ioloop *ioloop; +extern void (*hook_mail_storage_created)(struct mail_storage **storage); +extern void (*hook_client_created)(struct client **client); + #endif
--- a/src/pop3/main.c Sat Jul 26 21:24:00 2003 +0300 +++ b/src/pop3/main.c Sat Jul 26 21:29:02 2003 +0300 @@ -18,6 +18,9 @@ struct ioloop *ioloop; +void (*hook_mail_storage_created)(struct mail_storage **storage) = NULL; +void (*hook_client_created)(struct client **client) = NULL; + static struct module *modules; static char log_prefix[128]; /* syslog() needs this to be permanent */ @@ -104,6 +107,9 @@ } } + if (hook_mail_storage_created != NULL) + hook_mail_storage_created(&storage); + return client_create(0, 1, storage) != NULL; }