]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Added pop3 hooks
authorTimo Sirainen <tss@iki.fi>
Sat, 26 Jul 2003 18:29:02 +0000 (21:29 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 26 Jul 2003 18:29:02 +0000 (21:29 +0300)
--HG--
branch : HEAD

src/pop3/client.c
src/pop3/common.h
src/pop3/main.c

index b30bf94b3f91a0e53d8d9af543ac14e9ed28711f..bd8b79e6e798f17904f7df1686a974eb93341408 100644 (file)
@@ -139,6 +139,8 @@ struct client *client_create(int hin, int hout, struct mail_storage *storage)
        i_assert(my_client == NULL);
        my_client = client;
 
+       if (hook_client_created != NULL)
+               hook_client_created(&client);
        return client;
 }
 
index ed12ccaf181260f948dc8bde357aaa7228c9f58f..04f40d14e4304ae37a00e77c8fbfe542e2b8dc64 100644 (file)
@@ -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
index ba340ab868e1deed77a9e26cd457e47d39fdb378..31b27b0127c4c341484ccc488253dcb220c518f7 100644 (file)
@@ -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 @@ static int main_init(void)
                }
        }
 
+       if (hook_mail_storage_created != NULL)
+               hook_mail_storage_created(&storage);
+
        return client_create(0, 1, storage) != NULL;
 }