Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Use the port specified in the srv record when changing the fetch host
Baptiste Daroussin committed 12 years ago
commit 0597625f0939b5e7357dc9e5e291fea2058c4e55
parent 7319cf6cd03bffc2275a033ac24a7c1257ce1954
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));