From: Michael M Slusarz Date: Mon, 27 Aug 2018 03:53:56 +0000 (-0600) Subject: push-notification: Fix initializing push notification mailbox triggers X-Git-Tag: 2.3.4~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=319ebf06ad4e53d256590889abc4602daa322b61;p=thirdparty%2Fdovecot%2Fcore.git push-notification: Fix initializing push notification mailbox triggers None of the mailbox triggers were working, since the transaction was not being correctly initialized. --- diff --git a/src/plugins/push-notification/push-notification-plugin.c b/src/plugins/push-notification/push-notification-plugin.c index 067cb7e058..067d9a9a07 100644 --- a/src/plugins/push-notification/push-notification-plugin.c +++ b/src/plugins/push-notification/push-notification-plugin.c @@ -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); }