]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
push-notification: Fix initializing push notification mailbox triggers
authorMichael M Slusarz <michael.slusarz@dovecot.fi>
Mon, 27 Aug 2018 03:53:56 +0000 (21:53 -0600)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 14 Nov 2018 12:01:53 +0000 (14:01 +0200)
None of the mailbox triggers were working, since the transaction was
not being correctly initialized.

src/plugins/push-notification/push-notification-plugin.c

index 067cb7e0589d3d6da33c6df92e277318a9fe5536..067d9a9a076c18af8526f95ccb41fec0c730b6b8 100644 (file)
@@ -124,6 +124,7 @@ static void push_notification_mailbox_create(struct mailbox *box)
     struct push_notification_txn *ptxn;
 
     ptxn = push_notification_transaction_create(box, NULL);
+    push_notification_transaction_init(ptxn);
     push_notification_trigger_mbox_create(ptxn, box, NULL);
     push_notification_transaction_commit(ptxn, NULL);
 }
@@ -134,6 +135,7 @@ static void push_notification_mailbox_delete(void *txn ATTR_UNUSED,
     struct push_notification_txn *ptxn;
 
     ptxn = push_notification_transaction_create(box, NULL);
+    push_notification_transaction_init(ptxn);
     push_notification_trigger_mbox_delete(ptxn, box, NULL);
     push_notification_transaction_commit(ptxn, NULL);
 }
@@ -144,6 +146,7 @@ static void push_notification_mailbox_rename(struct mailbox *src,
     struct push_notification_txn *ptxn;
 
     ptxn = push_notification_transaction_create(dest, NULL);
+    push_notification_transaction_init(ptxn);
     push_notification_trigger_mbox_rename(ptxn, src, dest, NULL);
     push_notification_transaction_commit(ptxn, NULL);
 }
@@ -154,6 +157,7 @@ static void push_notification_mailbox_subscribe(struct mailbox *box,
     struct push_notification_txn *ptxn;
 
     ptxn = push_notification_transaction_create(box, NULL);
+    push_notification_transaction_init(ptxn);
     push_notification_trigger_mbox_subscribe(ptxn, box, subscribed, NULL);
     push_notification_transaction_commit(ptxn, NULL);
 }