pkg: Fix mirror type parsing and service discovery

Signed-off-by: Pavel Knoblokh <info@software-advisory.com.au>
Reviewed by:	emaste, imp, kevans
Fixes:		dc4581589a ("pkg: clean support for repositories")
Closes:		https://github.com/freebsd/freebsd-src/pull/1989
This commit is contained in:
Pavel Knoblokh
2026-02-04 21:59:21 -06:00
committed by Kyle Evans
parent 2e020c84cb
commit abf911af22
2 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -328,7 +328,8 @@ parse_mirror_type(struct repository *r, const char *mt)
{
if (strcasecmp(mt, "srv") == 0)
r->mirror_type = MIRROR_SRV;
r->mirror_type = MIRROR_NONE;
else
r->mirror_type = MIRROR_NONE;
}
static void
+6
View File
@@ -334,6 +334,12 @@ fetch_to_fd(struct repository *repo, const char *url, char *path, const char *fe
}
cleanup:
fetchFreeURL(u);
while (mirrors != NULL) {
current = mirrors;
mirrors = mirrors->next;
free(current);
}
if (remote != NULL)
fclose(remote);