In Function: main_alerter_loop
After successeful send information via script (media-type) - field 'status' does no changed to '1'.
May be it result SQL-code error?
snprintf(sql,sizeof(sql)-1,"update alerts set status=%d where alertid=%d and repeats>=maxrepeats and status=%d and retries<3", ALERT_STATUS_SENT, alert.alertid, ALERT_STATUS_NOT_SENT);
if now repeats = 2, and maxrepeats = 100
then 99 cicle's must be passed for running this SQL script (change trigger value)
After successeful send information via script (media-type) - field 'status' does no changed to '1'.
May be it result SQL-code error?
snprintf(sql,sizeof(sql)-1,"update alerts set status=%d where alertid=%d and repeats>=maxrepeats and status=%d and retries<3", ALERT_STATUS_SENT, alert.alertid, ALERT_STATUS_NOT_SENT);
if now repeats = 2, and maxrepeats = 100
then 99 cicle's must be passed for running this SQL script (change trigger value)