mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
feat(net-misc/curl) remove as portage-stable has newer version
This commit is contained in:
parent
b04112adcd
commit
f639711cdd
@ -1 +0,0 @@
|
||||
DIST curl-7.23.1.tar.bz2 2376653 RMD160 96c45f38361d04a939e135c9e5fcf27ca1180abe SHA1 9bac69696446ead85e59d8488098ee84cf897b7e SHA256 7d8c8cef8f244118245c37853cb175bd95c156ff453730ec2c88189b05a7c06e
|
||||
@ -1,118 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/curl/curl-7.23.1.ebuild,v 1.1 2011/12/01 18:35:02 vapier Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit autotools eutils prefix
|
||||
|
||||
DESCRIPTION="A Client that groks URLs"
|
||||
HOMEPAGE="http://curl.haxx.se/"
|
||||
SRC_URI="http://curl.haxx.se/download/${P}.tar.bz2"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="ares gnutls idn ipv6 kerberos ldap libssh2 nss ssl static-libs test threads"
|
||||
|
||||
RDEPEND="ldap? ( net-nds/openldap )
|
||||
gnutls? ( net-libs/gnutls dev-libs/libgcrypt app-misc/ca-certificates )
|
||||
ssl? ( !gnutls? ( dev-libs/openssl ) )
|
||||
nss? ( !gnutls? ( !ssl? ( dev-libs/nss app-misc/ca-certificates ) ) )
|
||||
idn? ( net-dns/libidn )
|
||||
ares? ( >=net-dns/c-ares-1.6 )
|
||||
kerberos? ( virtual/krb5 )
|
||||
libssh2? ( >=net-libs/libssh2-0.16 )"
|
||||
|
||||
# rtmpdump ( media-video/rtmpdump ) / --with-librtmp
|
||||
# fbopenssl (not in gentoo) --with-spnego
|
||||
# krb4 http://web.mit.edu/kerberos/www/krb4-end-of-life.html
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
sys-apps/diffutils
|
||||
dev-lang/perl
|
||||
)"
|
||||
# used - but can do without in self test: net-misc/stunnel
|
||||
|
||||
# ares must be disabled for threads and both can be disabled
|
||||
# one can use wether gnutls or nss if ssl is enabled
|
||||
REQUIRED_USE="threads? ( !ares )
|
||||
nss? ( !gnutls )"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-7.20.0-strip-ldflags.patch \
|
||||
"${FILESDIR}"/${PN}-7.19.7-test241.patch \
|
||||
"${FILESDIR}"/${PN}-7.18.2-prefix.patch \
|
||||
"${FILESDIR}"/${PN}-respect-cflags-3.patch \
|
||||
"${FILESDIR}"/0001-CURLOPT_DNS_SERVERS-set-name-servers-if-possible.patch \
|
||||
"${FILESDIR}"/0001-CURLOPT_DNS_SERVERS-set-name-servers-if-possible-fix.patch \
|
||||
"${FILESDIR}"/0001-Do-not-try-to-do-DNS-name-resolution-on-interface-na.patch \
|
||||
"${FILESDIR}"/0001-multi-handle-timeouts-on-DNS-servers-by-checking-for.patch \
|
||||
"${FILESDIR}"/0001-multi-interface-only-use-non-NULL-function-pointer.patch
|
||||
sed -i '/LD_LIBRARY_PATH=/d' configure.ac || die #382241
|
||||
|
||||
eprefixify curl-config.in
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
|
||||
if use gnutls; then
|
||||
myconf+=" --without-ssl --with-gnutls --without-nss"
|
||||
myconf+=" --with-ca-bundle=${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
|
||||
elif use ssl; then
|
||||
myconf+=" --without-gnutls --without-nss --with-ssl"
|
||||
myconf+=" --without-ca-bundle --with-ca-path=${EPREFIX}/etc/ssl/certs"
|
||||
elif use nss; then
|
||||
myconf+=" --without-ssl --without-gnutls --with-nss"
|
||||
myconf+=" --with-ca-bundle=${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
|
||||
else
|
||||
myconf+=" --without-gnutls --without-nss --without-ssl"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable ldap) \
|
||||
$(use_enable ldap ldaps) \
|
||||
$(use_with idn libidn) \
|
||||
$(use_with kerberos gssapi "${EPREFIX}"/usr) \
|
||||
$(use_with libssh2) \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable ipv6) \
|
||||
$(use_enable threads threaded-resolver) \
|
||||
$(use_enable ares) \
|
||||
--enable-http \
|
||||
--enable-ftp \
|
||||
--enable-gopher \
|
||||
--enable-file \
|
||||
--enable-dict \
|
||||
--enable-manual \
|
||||
--enable-telnet \
|
||||
--enable-smtp \
|
||||
--enable-pop3 \
|
||||
--enable-imap \
|
||||
--enable-rtsp \
|
||||
--enable-nonblocking \
|
||||
--enable-largefile \
|
||||
--enable-maintainer-mode \
|
||||
--disable-sspi \
|
||||
--without-krb4 \
|
||||
--without-librtmp \
|
||||
--without-spnego \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
find "${ED}" -name '*.la' -delete
|
||||
rm -rf "${ED}"/etc/
|
||||
|
||||
# https://sourceforge.net/tracker/index.php?func=detail&aid=1705197&group_id=976&atid=350976
|
||||
insinto /usr/share/aclocal
|
||||
doins docs/libcurl/libcurl.m4
|
||||
|
||||
dodoc CHANGES README
|
||||
dodoc docs/FEATURES docs/INTERNALS
|
||||
dodoc docs/MANUAL docs/FAQ docs/BUGS docs/CONTRIBUTE
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
From 740f7d8384049db24e3742f3cbe5f50d9cee0c7c Mon Sep 17 00:00:00 2001
|
||||
From: Jason Glasgow <jglasgow@chromium.org>
|
||||
Date: Wed, 30 Nov 2011 23:39:02 -0500
|
||||
Subject: [PATCH] CURLOPT_DNS_SERVERS: set name servers if possible (fix)
|
||||
|
||||
Ensure that CURLE_OK is returned if setting the name servers is successfull.
|
||||
---
|
||||
lib/asyn-ares.c | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
|
||||
index 7c2c372..1a105c2 100644
|
||||
--- a/lib/asyn-ares.c
|
||||
+++ b/lib/asyn-ares.c
|
||||
@@ -609,6 +609,7 @@ CURLcode Curl_set_dns_servers(struct SessionHandle *data,
|
||||
int ares_result = ares_set_servers_csv(data->state.resolver, servers);
|
||||
switch(ares_result) {
|
||||
case ARES_SUCCESS:
|
||||
+ result = CURLE_OK;
|
||||
break;
|
||||
case ARES_ENOMEM:
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
--
|
||||
1.7.3.1
|
||||
|
||||
@ -1,160 +0,0 @@
|
||||
From 8d0a504f0d34c2471393ef23fb2345c73c5d4746 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Glasgow <jglasgow@chromium.org>
|
||||
Date: Tue, 12 Apr 2011 11:34:28 -0400
|
||||
Subject: [PATCH] CURLOPT_DNS_SERVERS: set name servers if possible
|
||||
|
||||
---
|
||||
docs/libcurl/curl_easy_setopt.3 | 14 ++++++++++++++
|
||||
include/curl/curl.h | 3 +++
|
||||
lib/asyn-ares.c | 26 ++++++++++++++++++++++++++
|
||||
lib/asyn-thread.c | 9 +++++++++
|
||||
lib/hostip.h | 5 +++++
|
||||
lib/hostsyn.c | 11 +++++++++++
|
||||
lib/url.c | 4 ++++
|
||||
7 files changed, 72 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
|
||||
index 31464bf..3b86476 100644
|
||||
--- a/docs/libcurl/curl_easy_setopt.3
|
||||
+++ b/docs/libcurl/curl_easy_setopt.3
|
||||
@@ -2045,6 +2045,20 @@ resolves, by including a string in the linked list that uses the format
|
||||
and port number must exactly match what was already added previously.
|
||||
|
||||
(Added in 7.21.3)
|
||||
+.IP CURLOPT_DNS_SERVERS
|
||||
+Set the list of DNS servers to be used instead of the system default.
|
||||
+The format of the dns servers option is:
|
||||
+
|
||||
+host[:port][,host[:port]]...
|
||||
+
|
||||
+For example:
|
||||
+
|
||||
+192.168.1.100,192.168.1.101,3.4.5.6
|
||||
+
|
||||
+This option requires that libcurl was built with a resolver backend that
|
||||
+supports this operation. The c-ares backend is the only such one.
|
||||
+
|
||||
+(Added in 7.24.0)
|
||||
.SH SSL and SECURITY OPTIONS
|
||||
.IP CURLOPT_SSLCERT
|
||||
Pass a pointer to a zero terminated string as parameter. The string should be
|
||||
diff --git a/include/curl/curl.h b/include/curl/curl.h
|
||||
index f4aa17f..8f82348 100644
|
||||
--- a/include/curl/curl.h
|
||||
+++ b/include/curl/curl.h
|
||||
@@ -1486,6 +1486,9 @@ typedef enum {
|
||||
/* allow GSSAPI credential delegation */
|
||||
CINIT(GSSAPI_DELEGATION, LONG, 210),
|
||||
|
||||
+ /* Set the name servers to use for DNS resolution */
|
||||
+ CINIT(DNS_SERVERS, OBJECTPOINT, 211),
|
||||
+
|
||||
CURLOPT_LASTENTRY /* the last unused */
|
||||
} CURLoption;
|
||||
|
||||
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
|
||||
index 7f3bdf8..7c2c372 100644
|
||||
--- a/lib/asyn-ares.c
|
||||
+++ b/lib/asyn-ares.c
|
||||
@@ -600,4 +600,30 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
|
||||
}
|
||||
return NULL; /* no struct yet */
|
||||
}
|
||||
+
|
||||
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
|
||||
+ char *servers)
|
||||
+{
|
||||
+ CURLcode result = CURLE_NOT_BUILT_IN;
|
||||
+#if (ARES_VERSION >= 0x010704)
|
||||
+ int ares_result = ares_set_servers_csv(data->state.resolver, servers);
|
||||
+ switch(ares_result) {
|
||||
+ case ARES_SUCCESS:
|
||||
+ break;
|
||||
+ case ARES_ENOMEM:
|
||||
+ result = CURLE_OUT_OF_MEMORY;
|
||||
+ break;
|
||||
+ case ARES_ENOTINITIALIZED:
|
||||
+ case ARES_ENODATA:
|
||||
+ case ARES_EBADSTR:
|
||||
+ default:
|
||||
+ result = CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
+ break;
|
||||
+ }
|
||||
+#else /* too old c-ares version! */
|
||||
+ (void)data;
|
||||
+ (void)servers;
|
||||
+#endif
|
||||
+ return result;
|
||||
+}
|
||||
#endif /* CURLRES_ARES */
|
||||
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
|
||||
index 38cde5d..cd035dc 100644
|
||||
--- a/lib/asyn-thread.c
|
||||
+++ b/lib/asyn-thread.c
|
||||
@@ -696,4 +696,13 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
|
||||
|
||||
#endif /* !HAVE_GETADDRINFO */
|
||||
|
||||
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
|
||||
+ char *servers)
|
||||
+{
|
||||
+ (void)data;
|
||||
+ (void)servers;
|
||||
+ return CURLE_NOT_BUILT_IN;
|
||||
+
|
||||
+}
|
||||
+
|
||||
#endif /* CURLRES_THREADED */
|
||||
diff --git a/lib/hostip.h b/lib/hostip.h
|
||||
index 32a37b9..dbbb1f7 100644
|
||||
--- a/lib/hostip.h
|
||||
+++ b/lib/hostip.h
|
||||
@@ -195,4 +195,9 @@ Curl_cache_addr(struct SessionHandle *data, Curl_addrinfo *addr,
|
||||
extern sigjmp_buf curl_jmpenv;
|
||||
#endif
|
||||
|
||||
+/*
|
||||
+ * Function provided by the resolver backend to set DNS servers to use.
|
||||
+ */
|
||||
+CURLcode Curl_set_dns_servers(struct SessionHandle *data, char *servers);
|
||||
+
|
||||
#endif /* HEADER_CURL_HOSTIP_H */
|
||||
diff --git a/lib/hostsyn.c b/lib/hostsyn.c
|
||||
index b601887..d1a9079 100644
|
||||
--- a/lib/hostsyn.c
|
||||
+++ b/lib/hostsyn.c
|
||||
@@ -66,5 +66,16 @@
|
||||
**********************************************************************/
|
||||
#ifdef CURLRES_SYNCH
|
||||
|
||||
+/*
|
||||
+ * Function provided by the resolver backend to set DNS servers to use.
|
||||
+ */
|
||||
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
|
||||
+ char *servers)
|
||||
+{
|
||||
+ (void)data;
|
||||
+ (void)servers;
|
||||
+ return CURLE_NOT_BUILT_IN;
|
||||
+
|
||||
+}
|
||||
|
||||
#endif /* truly sync */
|
||||
diff --git a/lib/url.c b/lib/url.c
|
||||
index 4bc82a6..f478e38 100644
|
||||
--- a/lib/url.c
|
||||
+++ b/lib/url.c
|
||||
@@ -2531,6 +2531,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
||||
data->set.ssl.authtype = CURL_TLSAUTH_NONE;
|
||||
break;
|
||||
#endif
|
||||
+ case CURLOPT_DNS_SERVERS:
|
||||
+ result = Curl_set_dns_servers(data, va_arg(param, char *));
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
/* unknown tag and its companion, just ignore: */
|
||||
result = CURLE_UNKNOWN_OPTION;
|
||||
--
|
||||
1.7.3.1
|
||||
|
||||
@ -1,100 +0,0 @@
|
||||
From 1909c8096fc8ab5083e929e5b721d74d35bfe414 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Glasgow <jglasgow@chromium.org>
|
||||
Date: Fri, 4 Nov 2011 16:48:05 -0400
|
||||
Subject: [PATCH] Do not try to do DNS name resolution on interface names
|
||||
|
||||
Do not try to do DNS name resolution on interface names because it can
|
||||
block and that is no desirable when using multi interfaces.
|
||||
---
|
||||
lib/connect.c | 5 ++++-
|
||||
lib/if2ip.c | 31 +++++++++++++++++++++++++++++++
|
||||
lib/if2ip.h | 1 +
|
||||
3 files changed, 36 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/lib/connect.c b/lib/connect.c
|
||||
index 56a57b1..4305864 100644
|
||||
--- a/lib/connect.c
|
||||
+++ b/lib/connect.c
|
||||
@@ -265,7 +265,10 @@ static CURLcode bindlocal(struct connectdata *conn,
|
||||
if(dev && (strlen(dev)<255) ) {
|
||||
|
||||
/* interface */
|
||||
- if(Curl_if2ip(af, dev, myhost, sizeof(myhost))) {
|
||||
+ if(Curl_if_is_interface_name(dev)) {
|
||||
+ if(Curl_if2ip(af, dev, myhost, sizeof(myhost)) == NULL)
|
||||
+ return CURLE_INTERFACE_FAILED;
|
||||
+
|
||||
/*
|
||||
* We now have the numerical IP address in the 'myhost' buffer
|
||||
*/
|
||||
diff --git a/lib/if2ip.c b/lib/if2ip.c
|
||||
index 4924f73..0ae375b 100644
|
||||
--- a/lib/if2ip.c
|
||||
+++ b/lib/if2ip.c
|
||||
@@ -71,6 +71,24 @@
|
||||
|
||||
#if defined(HAVE_GETIFADDRS)
|
||||
|
||||
+bool Curl_if_is_interface_name(const char *interface)
|
||||
+{
|
||||
+ bool result = FALSE;
|
||||
+
|
||||
+ struct ifaddrs *iface, *head;
|
||||
+
|
||||
+ if(getifaddrs(&head) >= 0) {
|
||||
+ for(iface=head; iface != NULL; iface=iface->ifa_next) {
|
||||
+ if(curl_strequal(iface->ifa_name, interface)) {
|
||||
+ result = TRUE;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ freeifaddrs(head);
|
||||
+ }
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
|
||||
{
|
||||
struct ifaddrs *iface, *head;
|
||||
@@ -109,6 +127,14 @@ char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
|
||||
|
||||
#elif defined(HAVE_IOCTL_SIOCGIFADDR)
|
||||
|
||||
+bool Curl_if_is_interface_name(const char *interface)
|
||||
+{
|
||||
+ /* This is here just to support the old interfaces */
|
||||
+ char buf[256];
|
||||
+
|
||||
+ return (Curl_if2ip(AF_INET, interface, buf, sizeof(buf)) != NULL);
|
||||
+}
|
||||
+
|
||||
char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
|
||||
{
|
||||
struct ifreq req;
|
||||
@@ -148,6 +174,11 @@ char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
|
||||
|
||||
#else
|
||||
|
||||
+bool Curl_if_is_interface_name(const char *interface)
|
||||
+{
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size)
|
||||
{
|
||||
(void) af;
|
||||
diff --git a/lib/if2ip.h b/lib/if2ip.h
|
||||
index cdf2638..678e3a5 100644
|
||||
--- a/lib/if2ip.h
|
||||
+++ b/lib/if2ip.h
|
||||
@@ -23,6 +23,7 @@
|
||||
***************************************************************************/
|
||||
#include "setup.h"
|
||||
|
||||
+extern bool Curl_if_is_interface_name(const char *interface);
|
||||
extern char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size);
|
||||
|
||||
#ifdef __INTERIX
|
||||
--
|
||||
1.7.3.1
|
||||
|
||||
@ -1,78 +0,0 @@
|
||||
From 595f2e5385c3ca8d1216327eff8f0a635c198008 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Glasgow <jglasgow@chromium.org>
|
||||
Date: Wed, 30 Nov 2011 15:23:44 -0500
|
||||
Subject: [PATCH] multi: handle timeouts on DNS servers by checking for new sockets
|
||||
|
||||
If the first name server is not available, the multi interface does
|
||||
not invoke the socket_cb when the DNS request to the first name server
|
||||
timesout. Ensure that the list of sockets are always updated after
|
||||
calling Curl_resolver_is_resolved.
|
||||
|
||||
This bug can be reproduced if Curl is complied with --enable_ares and
|
||||
your code uses the multi socket interfaces and the
|
||||
CURLMOPT_SOCKETFUNCTION option. To test try:
|
||||
iptables -I INPUT \
|
||||
-s $(sed -n -e '/name/{s/.* //p;q}' /etc/resolv.conf)/32 \
|
||||
-j REJECT
|
||||
and then run a program which uses the multi-interface.
|
||||
---
|
||||
lib/asyn-ares.c | 9 +++++----
|
||||
lib/multi.c | 13 ++++++++-----
|
||||
2 files changed, 13 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
|
||||
index 7c2c372..0b45484 100644
|
||||
--- a/lib/asyn-ares.c
|
||||
+++ b/lib/asyn-ares.c
|
||||
@@ -227,18 +227,19 @@ int Curl_resolver_getsock(struct connectdata *conn,
|
||||
struct timeval maxtime;
|
||||
struct timeval timebuf;
|
||||
struct timeval *timeout;
|
||||
+ long milli;
|
||||
int max = ares_getsock((ares_channel)conn->data->state.resolver,
|
||||
(ares_socket_t *)socks, numsocks);
|
||||
|
||||
-
|
||||
maxtime.tv_sec = CURL_TIMEOUT_RESOLVE;
|
||||
maxtime.tv_usec = 0;
|
||||
|
||||
timeout = ares_timeout((ares_channel)conn->data->state.resolver, &maxtime,
|
||||
&timebuf);
|
||||
-
|
||||
- Curl_expire(conn->data,
|
||||
- (timeout->tv_sec * 1000) + (timeout->tv_usec/1000));
|
||||
+ milli = (timeout->tv_sec * 1000) + (timeout->tv_usec/1000);
|
||||
+ if(milli == 0)
|
||||
+ milli += 10;
|
||||
+ Curl_expire(conn->data, milli);
|
||||
|
||||
return max;
|
||||
}
|
||||
diff --git a/lib/multi.c b/lib/multi.c
|
||||
index ae70851..3059e49 100644
|
||||
--- a/lib/multi.c
|
||||
+++ b/lib/multi.c
|
||||
@@ -1085,12 +1085,15 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
||||
/* check if we have the name resolved by now */
|
||||
easy->result = Curl_resolver_is_resolved(easy->easy_conn, &dns);
|
||||
|
||||
- if(dns) {
|
||||
- /* Update sockets here. Mainly because the socket(s) may have been
|
||||
- closed and the application thus needs to be told, even if it is
|
||||
- likely that the same socket(s) will again be used further down. */
|
||||
- singlesocket(multi, easy);
|
||||
+ /* Update sockets here, because the socket(s) may have been
|
||||
+ closed and the application thus needs to be told, even if it
|
||||
+ is likely that the same socket(s) will again be used further
|
||||
+ down. If the name has not yet been resolved, it is likely
|
||||
+ that new sockets have been opened in an attempt to contact
|
||||
+ another resolver. */
|
||||
+ singlesocket(multi, easy);
|
||||
|
||||
+ if(dns) {
|
||||
/* Perform the next step in the connection phase, and then move on
|
||||
to the WAITCONNECT state */
|
||||
easy->result = Curl_async_resolved(easy->easy_conn,
|
||||
--
|
||||
1.7.3.1
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
From d81f5ea3e0a5f9a532fcf685898e041fafa93a5b Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: Fri, 2 Dec 2011 21:10:28 +0100
|
||||
Subject: [PATCH] multi interface: only use non-NULL function pointer!
|
||||
|
||||
If the socket callback function pointer hasn't been set, we must not
|
||||
attempt to use it. Commit adc88ca20 made it more likely to occur.
|
||||
---
|
||||
lib/multi.c | 22 ++++++++++++----------
|
||||
1 files changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/lib/multi.c b/lib/multi.c
|
||||
index 3059e49..f3b892c 100644
|
||||
--- a/lib/multi.c
|
||||
+++ b/lib/multi.c
|
||||
@@ -1940,11 +1940,12 @@ static void singlesocket(struct Curl_multi *multi,
|
||||
}
|
||||
|
||||
/* we know (entry != NULL) at this point, see the logic above */
|
||||
- multi->socket_cb(easy->easy_handle,
|
||||
- s,
|
||||
- action,
|
||||
- multi->socket_userp,
|
||||
- entry->socketp);
|
||||
+ if(multi->socket_cb)
|
||||
+ multi->socket_cb(easy->easy_handle,
|
||||
+ s,
|
||||
+ action,
|
||||
+ multi->socket_userp,
|
||||
+ entry->socketp);
|
||||
|
||||
entry->action = action; /* store the current action state */
|
||||
}
|
||||
@@ -2019,11 +2020,12 @@ static void singlesocket(struct Curl_multi *multi,
|
||||
remove_sock_from_hash = FALSE;
|
||||
|
||||
if(remove_sock_from_hash) {
|
||||
- multi->socket_cb(easy->easy_handle,
|
||||
- s,
|
||||
- CURL_POLL_REMOVE,
|
||||
- multi->socket_userp,
|
||||
- entry ? entry->socketp : NULL);
|
||||
+ if(multi->socket_cb)
|
||||
+ multi->socket_cb(easy->easy_handle,
|
||||
+ s,
|
||||
+ CURL_POLL_REMOVE,
|
||||
+ multi->socket_userp,
|
||||
+ entry ? entry->socketp : NULL);
|
||||
sh_delentry(multi->sockhash, s);
|
||||
}
|
||||
|
||||
--
|
||||
1.7.3.1
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
--- curl-config.in.orig 2008-10-10 13:43:19.000000000 +0200
|
||||
+++ curl-config.in 2008-10-10 13:43:56.000000000 +0200
|
||||
@@ -181,7 +181,7 @@
|
||||
;;
|
||||
|
||||
--cflags)
|
||||
- if test "X@includedir@" = "X/usr/include"; then
|
||||
+ if test "X@includedir@" = "X@GENTOO_PORTAGE_EPREFIX@/usr/include"; then
|
||||
echo ""
|
||||
else
|
||||
echo "-I@includedir@"
|
||||
@@ -189,7 +189,7 @@
|
||||
;;
|
||||
|
||||
--libs)
|
||||
- if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
|
||||
+ if test "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib" -a "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib64"; then
|
||||
CURLLIBDIR="-L@libdir@ "
|
||||
else
|
||||
CURLLIBDIR=""
|
||||
@ -1,20 +0,0 @@
|
||||
--- tests/data/test241.orig 2008-11-20 08:12:35.000000000 +1100
|
||||
+++ tests/data/test241 2009-11-05 14:22:07.000000000 +1100
|
||||
@@ -33,7 +33,7 @@
|
||||
HTTP-IPv6 GET (using ip6-localhost)
|
||||
</name>
|
||||
<command>
|
||||
--g "http://ip6-localhost:%HTTP6PORT/241"
|
||||
+-g "http://::1:%HTTP6PORT/241"
|
||||
</command>
|
||||
<precheck>
|
||||
./server/resolve --ipv6 ip6-localhost
|
||||
@@ -48,7 +48,7 @@
|
||||
</strip>
|
||||
<protocol>
|
||||
GET /241 HTTP/1.1
|
||||
-Host: ip6-localhost:%HTTP6PORT
|
||||
+Host: ::1:%HTTP6PORT
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
@ -1,14 +0,0 @@
|
||||
--- curl-config.in.orig 2007-09-14 07:36:18.000000000 +1000
|
||||
+++ curl-config.in 2007-09-14 07:37:14.000000000 +1000
|
||||
@@ -187,9 +187,9 @@
|
||||
CURLLIBDIR=""
|
||||
fi
|
||||
if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
|
||||
- echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
|
||||
+ echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@ @LIBS@
|
||||
else
|
||||
- echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
|
||||
+ echo ${CURLLIBDIR}-lcurl @LIBS@
|
||||
fi
|
||||
;;
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e9b49c7..e374ab6 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -280,9 +280,6 @@ dnl **********************************************************************
|
||||
|
||||
CURL_CHECK_COMPILER
|
||||
CURL_SET_COMPILER_BASIC_OPTS
|
||||
-CURL_SET_COMPILER_DEBUG_OPTS
|
||||
-CURL_SET_COMPILER_OPTIMIZE_OPTS
|
||||
-CURL_SET_COMPILER_WARNING_OPTS
|
||||
|
||||
if test "$compiler_id" = "INTEL_UNIX_C"; then
|
||||
#
|
||||
Loading…
x
Reference in New Issue
Block a user