From: Aki Tuomi Date: Mon, 15 Oct 2018 09:04:19 +0000 (+0300) Subject: push-notification: Emit event on transaction end X-Git-Tag: 2.3.4~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81e373908553a791110bc234e27c429689c0f32c;p=thirdparty%2Fdovecot%2Fcore.git push-notification: Emit event on transaction end --- diff --git a/src/plugins/push-notification/push-notification-plugin.c b/src/plugins/push-notification/push-notification-plugin.c index 37ad32d027..c2b2440317 100644 --- a/src/plugins/push-notification/push-notification-plugin.c +++ b/src/plugins/push-notification/push-notification-plugin.c @@ -20,6 +20,7 @@ #define PUSH_NOTIFICATION_CONFIG "push_notification_driver" #define PUSH_NOTIFICATION_CONFIG_OLD "push_notification_backend" +#define PUSH_NOTIFICATION_EVENT_FINISHED "push_notification_finished" #define PUSH_NOTIFICATION_USER_CONTEXT(obj) \ MODULE_CONTEXT_REQUIRE(obj, push_notification_user_module) @@ -102,6 +103,10 @@ static void push_notification_transaction_end } } + struct event_passthrough *e = event_create_passthrough(ptxn->event)-> + set_name(PUSH_NOTIFICATION_EVENT_FINISHED); + /* emit event */ + e_debug(e->event(), "Push notification transaction completed"); event_unref(&ptxn->event); pool_unref(&ptxn->pool); }