Commit Diff


commit - ec7e15af96ef58f2abc62564fc58b38401903ab1
commit + 8c7f82a788f08b201d435fc9ea4004bb3fcd430f
blob - 1fb23e1efc3fb48df0a11e28046f9e271e8cdb92
blob + b396fe0b891ffe06aa77fe97c43648f7bcace725
--- 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)