Add new $TrigAttempts special var.

This commit is contained in:
David F. Skoll
2012-12-09 11:17:16 -05:00
parent 292262c128
commit 9ef3be33e5
4 changed files with 10 additions and 2 deletions
+7 -1
View File
@@ -426,7 +426,10 @@ int ComputeTrigger(int today, Trigger *trig, int *err, int save_in_globals)
result;
trig->expired = 0;
if (save_in_globals) LastTrigValid = 0;
if (save_in_globals) {
LastTrigValid = 0;
TrigAttempts = 0;
}
/* Assume everything works */
*err = OK;
@@ -448,6 +451,9 @@ int ComputeTrigger(int today, Trigger *trig, int *err, int save_in_globals)
while (nattempts++ < TRIG_ATTEMPTS) {
if (save_in_globals) {
TrigAttempts = nattempts;
}
result = GetNextTriggerDate(trig, start, err, &nextstart);
/* If there's an error, die immediately */