From c34527d63112b126642ef5b4c704e7d4535029e7 Mon Sep 17 00:00:00 2001 From: joerg Date: Mon, 11 Jan 2010 17:23:10 +0000 Subject: libfetch-2.27: The connection sharing didn't handle the case of active transfers correctly and tried to close the connection in that case (PR 42607). Correctly check if there is a transfer going on and just leave the connection alone in that case. --- net/libfetch/Makefile | 4 ++-- net/libfetch/files/ftp.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'net') diff --git a/net/libfetch/Makefile b/net/libfetch/Makefile index ee4851adeab..86e49d4624b 100644 --- a/net/libfetch/Makefile +++ b/net/libfetch/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.33 2009/10/15 12:36:57 joerg Exp $ +# $NetBSD: Makefile,v 1.34 2010/01/11 17:23:10 joerg Exp $ # -DISTNAME= libfetch-2.26 +DISTNAME= libfetch-2.27 CATEGORIES= net MASTER_SITES= # empty DISTFILES= # empty diff --git a/net/libfetch/files/ftp.c b/net/libfetch/files/ftp.c index 4745b5e16c6..669f44cad3f 100644 --- a/net/libfetch/files/ftp.c +++ b/net/libfetch/files/ftp.c @@ -1,4 +1,4 @@ -/* $NetBSD: ftp.c,v 1.30 2009/10/15 12:36:57 joerg Exp $ */ +/* $NetBSD: ftp.c,v 1.31 2010/01/11 17:23:10 joerg Exp $ */ /*- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav * Copyright (c) 2008, 2009 Joerg Sonnenberger @@ -1088,7 +1088,7 @@ ftp_cached_connect(struct url *url, struct url *purl, const char *flags) return (NULL); doc = strdup(url->doc); if (doc != NULL) { - if (cached_connection) + if (cached_connection && !cached_connection->is_active) ftp_disconnect(cached_connection); cached_connection = fetch_ref(conn); memcpy(&cached_host, url, sizeof(*url)); -- cgit v1.2.3