From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 13 15:00:15 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4777716A400 for ; Tue, 13 Mar 2007 15:00:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 08AAC13C455 for ; Tue, 13 Mar 2007 15:00:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l2DF0Ej5095120 for ; Tue, 13 Mar 2007 15:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l2DF0EKB095119; Tue, 13 Mar 2007 15:00:14 GMT (envelope-from gnats) Resent-Date: Tue, 13 Mar 2007 15:00:14 GMT Resent-Message-Id: <200703131500.l2DF0EKB095119@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 56C6216A400; Tue, 13 Mar 2007 14:54:27 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from pobox.codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 0A14D13C483; Tue, 13 Mar 2007 14:54:26 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from localdomain by pobox.codelabs.ru with local id 1HR8ON-000Psm-CE; Tue, 13 Mar 2007 17:54:23 +0300 Message-Id: Date: Tue, 13 Mar 2007 17:54:23 +0300 From: Eygene Ryabinkin Sender: rea-fbsd@codelabs.ru To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: roam@FreeBSD.org Subject: ports/110270: backport patch for ftp/curl from CURL's CVS X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 15:00:15 -0000 >Number: 110270 >Category: ports >Synopsis: backport patch for ftp/curl from CURL's CVS >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Mar 13 15:00:11 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 6.2-STABLE i386 >Organization: Code Labs >Environment: System: FreeBSD XXX 6.2-STABLE FreeBSD 6.2-STABLE #13: Mon Feb 12 15:59:07 MSK 2007 root@XXX:/usr/obj/usr/src/sys/XXX i386 >Description: I fixed the bug that provoked SEGVs in Curl for the CVS version and I will be happy if this patch will be incorporated to the FreeBSD port: ports/devel/git is not very much usable over HTTP without the patch. >How-To-Repeat: See http://cool.haxx.se/cvs.cgi/curl/lib/url.c, entries for 1.595 and 1.596. >Fix: The new version of url.c patch is below. I will be very grateful if someone will tell me why the signal and thread handling is different for FreeBSD, since I am trying to get the original patch for url.c to be committed into the cURL mainstream, but I can not answer the question why we need to set the 'data->set.no_signal' to 'TRUE'. Thanks! --- lib/url.c.orig Mon Jan 29 01:45:22 2007 +++ lib/url.c Tue Mar 13 17:36:31 2007 @@ -553,6 +553,10 @@ data->set.httpauth = CURLAUTH_BASIC; /* defaults to basic */ data->set.proxyauth = CURLAUTH_BASIC; /* defaults to basic */ +#if defined(__FreeBSD_version) + data->set.no_signal = TRUE; /* different handling of signals and threads */ +#endif /* __FreeBSD_version */ + /* This no longer creates a connection cache here. It is instead made on the first call to curl_easy_perform() or when the handle is added to a multi stack. */ @@ -4151,9 +4155,6 @@ if(data->set.reuse_forbid || conn->bits.close) { CURLcode res2 = Curl_disconnect(conn); /* close the connection */ - *connp = NULL; /* to make the caller of this function better detect that - this was actually killed here */ - /* If we had an error already, make sure we return that one. But if we got a new error, return that. */ if(!result && res2) @@ -4169,6 +4170,9 @@ conn->connectindex, conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname); } + + *connp = NULL; /* to make the caller of this function better detect that + this was actually killed here */ return result; } >Release-Note: >Audit-Trail: >Unformatted: