Skip to content

Commit 2a9b304

Browse files
committed
FOGL-9183: send trigger if lastsent time different than current time in seconds
Signed-off-by: nandan <[email protected]>
1 parent 2edf177 commit 2a9b304

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

C/services/notification/notification_manager.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,10 @@ bool NotificationInstance::handleState(bool evalRet)
811811
// Set state depends on evalRet
812812
setTriggered = evalRet;
813813
// Try sending "triggered" when evaluation is true
814-
ret = evalRet && timercmp(&diffTimeTv, &nType.retriggerTimeTv, >=);
814+
if ( ( nType.retriggerTimeTv.tv_sec > 0) && (m_lastSentTv.tv_sec == now_tv.tv_sec))
815+
ret = false;
816+
else
817+
ret = evalRet && timercmp(&diffTimeTv, &nType.retriggerTimeTv, >=);
815818
break;
816819

817820
default:

0 commit comments

Comments
 (0)