Commit Diff


commit - c7b4f194634a299a4251d32f577314a2a3606fc5d7d2b83ee3d51c3a66e15a1c
commit + 9a88519990ef86f982a8c204c5c6b19d7a1053da414e869e14ddd258710d3dbd
blob - 3ab035aff34d97763e7820a4f323c54e4ac6a250bd87391ec201178833ed4c8c
blob + ae72fba1af02127e16896f1288500ff989b2677838681c503304a8a1b7d9e327
--- gotsysd/libexec/gotsys-write-conf/gotsys-write-conf.c	
+++ gotsysd/libexec/gotsys-write-conf/gotsys-write-conf.c	
@@ -578,6 +578,7 @@ write_repo_secrets(off_t *written, struct gotsys_repo 
 	size_t len;
 
 	STAILQ_FOREACH(target, &repo->notification_targets, entry) {
+		i++;
 		if (target->type != GOTSYS_NOTIFICATION_VIA_HTTP)
 			continue;
 
@@ -586,8 +587,6 @@ write_repo_secrets(off_t *written, struct gotsys_repo 
 		    target->conf.http.hmac_secret == NULL)
 			continue;
 
-		i++;
-
 		if (target->conf.http.user && target->conf.http.password) {
 			ret = snprintf(label, sizeof(label), "basic%d", i);
 			if (ret == -1)