Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Use the port specified in the srv record when changing the fetch host
Baptiste Daroussin committed 12 years ago
commit 0597625f0939b5e7357dc9e5e291fea2058c4e55
parent 7319cf6
1 file changed +3 -1
modified libpkg/fetch.c
@@ -313,8 +313,10 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest, time_t *t
			}
		}

-
		if (repo != NULL && repo->mirror_type == SRV && repo->srv != NULL)
+
		if (repo != NULL && repo->mirror_type == SRV && repo->srv != NULL) {
			strlcpy(u->host, srv_current->host, sizeof(u->host));
+
			u->port = srv_current->port;
+
		}
		else if (repo != NULL && repo->mirror_type == HTTP && repo->http != NULL) {
			strlcpy(u->scheme, http_current->url->scheme, sizeof(u->scheme));
			strlcpy(u->host, http_current->url->host, sizeof(u->host));