mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
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:
1 parent
2e020c84cb
commit
abf911af22
2 files changed
+8
-1
No files matched your search
@@ -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 @@ fetchfail:
|
||||
}
|
||||
|
||||
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