gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 191/219: hostip: CURL_DISABLE_SHUFFLE_DNS


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 191/219: hostip: CURL_DISABLE_SHUFFLE_DNS
Date: Wed, 22 May 2019 19:18:50 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 3cfcdf08d85488d162ce10a6ce5433dbe510264d
Author: Daniel Stenberg <address@hidden>
AuthorDate: Sun May 5 17:08:22 2019 +0200

    hostip: CURL_DISABLE_SHUFFLE_DNS
---
 lib/hostip.c | 5 ++++-
 lib/setopt.c | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/hostip.c b/lib/hostip.c
index ed00ad5b9..cf33ed8f4 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -334,9 +334,9 @@ Curl_fetch_addr(struct connectdata *conn,
   return dns;
 }
 
+#ifndef CURL_DISABLE_SHUFFLE_DNS
 UNITTEST CURLcode Curl_shuffle_addr(struct Curl_easy *data,
                                     Curl_addrinfo **addr);
-
 /*
  * Curl_shuffle_addr() shuffles the order of addresses in a 'Curl_addrinfo'
  * struct by re-linking its linked list.
@@ -401,6 +401,7 @@ UNITTEST CURLcode Curl_shuffle_addr(struct Curl_easy *data,
   }
   return result;
 }
+#endif
 
 /*
  * Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache.
@@ -422,12 +423,14 @@ Curl_cache_addr(struct Curl_easy *data,
   struct Curl_dns_entry *dns;
   struct Curl_dns_entry *dns2;
 
+#ifndef CURL_DISABLE_SHUFFLE_DNS
   /* shuffle addresses if requested */
   if(data->set.dns_shuffle_addresses) {
     CURLcode result = Curl_shuffle_addr(data, &addr);
     if(result)
       return NULL;
   }
+#endif
 
   /* Create a new cache entry */
   dns = calloc(1, sizeof(struct Curl_dns_entry));
diff --git a/lib/setopt.c b/lib/setopt.c
index 13e1a14ae..becd6618c 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -2654,9 +2654,11 @@ static CURLcode vsetopt(struct Curl_easy *data, 
CURLoption option,
       return CURLE_BAD_FUNCTION_ARGUMENT;
     data->set.happy_eyeballs_timeout = arg;
     break;
+#ifndef CURL_DISABLE_SHUFFLE_DNS
   case CURLOPT_DNS_SHUFFLE_ADDRESSES:
     data->set.dns_shuffle_addresses = (0 != va_arg(param, long)) ? TRUE:FALSE;
     break;
+#endif
   case CURLOPT_DISALLOW_USERNAME_IN_URL:
     data->set.disallow_username_in_url =
       (0 != va_arg(param, long)) ? TRUE : FALSE;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]