[dovecot-cvs] dovecot/src/lib-storage mail-storage-private.h, 1.32, 1.33 mail-storage.c, 1.56, 1.57
cras at dovecot.org
cras at dovecot.org
Tue Jul 11 19:00:24 EEST 2006
- Previous message: [dovecot-cvs] dovecot/src/lib-mail Makefile.am, 1.13, 1.14 message-id.c, NONE, 1.1 message-id.h, NONE, 1.1
- Next message: [dovecot-cvs] dovecot/src/lib-index mail-index.c, 1.237, 1.238 mail-index-sync-update.c, 1.100, 1.101 mail-index-sync-private.h, 1.31, 1.32 mail-index-sync-ext.c, 1.19, 1.20 mail-index-private.h, 1.72, 1.73 mail-cache.c, 1.82, 1.83 mail-cache-sync-update.c, 1.10, 1.11 mail-cache-private.h, 1.30, 1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv9293
Modified Files:
mail-storage-private.h mail-storage.c
Log Message:
Added hook_mailbox_opened to make it easier to hook all mailbox opens.
Index: mail-storage-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage-private.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- mail-storage-private.h 29 Jun 2006 11:08:50 -0000 1.32
+++ mail-storage-private.h 11 Jul 2006 16:00:08 -0000 1.33
@@ -8,6 +8,9 @@
#define MAIL_STORAGE_ERR_MAILBOX_NOT_FOUND "Mailbox doesn't exist: %s"
#define MAIL_STORAGE_ERR_NO_PERMISSION "Permission denied"
+/* Called after mailbox has been opened */
+extern void (*hook_mailbox_opened)(struct mailbox *box);
+
struct mail_storage_vfuncs {
void (*class_init)(void);
void (*class_deinit)(void);
Index: mail-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- mail-storage.c 28 Jun 2006 16:31:06 -0000 1.56
+++ mail-storage.c 11 Jul 2006 16:00:08 -0000 1.57
@@ -27,6 +27,8 @@
unsigned int mail_storage_module_id = 0;
unsigned int mail_storage_mail_index_module_id = 0;
+void (*hook_mailbox_opened)(struct mailbox *box) = NULL;
+
static ARRAY_DEFINE(storages, struct mail_storage *);
void mail_storage_init(void)
@@ -366,7 +368,12 @@
struct istream *input,
enum mailbox_open_flags flags)
{
- return storage->v.mailbox_open(storage, name, input, flags);
+ struct mailbox *box;
+
+ box = storage->v.mailbox_open(storage, name, input, flags);
+ if (hook_mailbox_opened != NULL && box != NULL)
+ hook_mailbox_opened(box);
+ return box;
}
int mailbox_close(struct mailbox **_box)
- Previous message: [dovecot-cvs] dovecot/src/lib-mail Makefile.am, 1.13, 1.14 message-id.c, NONE, 1.1 message-id.h, NONE, 1.1
- Next message: [dovecot-cvs] dovecot/src/lib-index mail-index.c, 1.237, 1.238 mail-index-sync-update.c, 1.100, 1.101 mail-index-sync-private.h, 1.31, 1.32 mail-index-sync-ext.c, 1.19, 1.20 mail-index-private.h, 1.72, 1.73 mail-cache.c, 1.82, 1.83 mail-cache-sync-update.c, 1.10, 1.11 mail-cache-private.h, 1.30, 1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list