Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2007 17:54:23 +0300
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        roam@FreeBSD.org
Subject:   ports/110270: backport patch for ftp/curl from CURL's CVS
Message-ID:  <E1HR8ON-000Psm-CE@pobox.codelabs.ru>
Resent-Message-ID: <200703131500.l2DF0EKB095119@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1HR8ON-000Psm-CE>