From 2a9b30439a8e8ec6ef4aec451bbcc06132f47fa3 Mon Sep 17 00:00:00 2001 From: nandan Date: Tue, 5 Nov 2024 20:24:17 +0530 Subject: [PATCH] FOGL-9183: send trigger if lastsent time different than current time in seconds Signed-off-by: nandan --- C/services/notification/notification_manager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C/services/notification/notification_manager.cpp b/C/services/notification/notification_manager.cpp index 8973199..47d9209 100644 --- a/C/services/notification/notification_manager.cpp +++ b/C/services/notification/notification_manager.cpp @@ -811,7 +811,10 @@ bool NotificationInstance::handleState(bool evalRet) // Set state depends on evalRet setTriggered = evalRet; // Try sending "triggered" when evaluation is true - ret = evalRet && timercmp(&diffTimeTv, &nType.retriggerTimeTv, >=); + if ( ( nType.retriggerTimeTv.tv_sec > 0) && (m_lastSentTv.tv_sec == now_tv.tv_sec)) + ret = false; + else + ret = evalRet && timercmp(&diffTimeTv, &nType.retriggerTimeTv, >=); break; default: