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:
committed by
Kyle Evans
parent
2e020c84cb
commit
abf911af22
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user