pkg: Fix mirror type parsing and service discovery

Signed-off-by: Pavel Knoblokh <[email protected]>
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 authored and Kyle Evans committed 2026-02-04 21:59:21 -06:00
1 parent 2e020c84cb
commit abf911af22
2 files changed
+8 -1

No files matched your search

+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 @@ fetchfail:
}
cleanup:
fetchFreeURL(u);
while (mirrors != NULL) {
current = mirrors;
mirrors = mirrors->next;
free(current);
}
if (remote != NULL)
fclose(remote);