]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Add mail_storage.event_category
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 16 Apr 2018 12:27:18 +0000 (15:27 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 16 Apr 2018 14:25:37 +0000 (14:25 +0000)
If set, this category is added to mail_storage.event.

src/lib-storage/mail-storage-private.h
src/lib-storage/mail-storage.c

index 31c78b32d5a88cffdbc3f49fd5c37ae12ca55174..a6ea088b774dd098ec651bf3c58336f8e0fa5740 100644 (file)
@@ -136,6 +136,7 @@ struct mail_storage {
           MAIL_FETCH_IMAP_BODYSTRUCTURE from the remote server. Adding fields
           here avoids adding them to index_mail_data.access_part. */
        enum mail_fetch_field nonbody_access_fields;
+       struct event_category *event_category;
 
         struct mail_storage_vfuncs v, *vlast;
 
index a1cfe4b0f6e7a695278e791582976a16c6a460ba..4acdf42109c51c8075ea5b880f0826ca82ab339f 100644 (file)
@@ -422,6 +422,8 @@ int mail_storage_create_full(struct mail_namespace *ns, const char *driver,
        storage->set = ns->mail_set;
        storage->flags = flags;
        storage->event = event_create(ns->user->event);
+       if (storage_class->event_category != NULL)
+               event_add_category(storage->event, storage_class->event_category);
        p_array_init(&storage->module_contexts, storage->pool, 5);
 
        if (storage->v.create != NULL &&