gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 159/219: doh: CURL_DISABLE_DOH


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 159/219: doh: CURL_DISABLE_DOH
Date: Wed, 22 May 2019 19:18:18 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit ae4adae954c958f1e3b45e6759fec6095137b23c
Author: Daniel Stenberg <address@hidden>
AuthorDate: Sun May 5 17:08:21 2019 +0200

    doh: CURL_DISABLE_DOH
---
 lib/doh.c     |  4 ++++
 lib/doh.h     | 10 +++++++++-
 lib/urldata.h |  2 ++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/lib/doh.c b/lib/doh.c
index b5327c4ae..7d4a69d2f 100644
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -22,6 +22,8 @@
 
 #include "curl_setup.h"
 
+#ifndef CURL_DISABLE_DOH
+
 #include "urldata.h"
 #include "curl_addrinfo.h"
 #include "doh.h"
@@ -960,3 +962,5 @@ CURLcode Curl_doh_is_resolved(struct connectdata *conn,
 
   return CURLE_OK;
 }
+
+#endif /* CURL_DISABLE_DOH */
diff --git a/lib/doh.h b/lib/doh.h
index 83c79bc5d..34bfa6f2b 100644
--- a/lib/doh.h
+++ b/lib/doh.h
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2018, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 2018 - 2019, Daniel Stenberg, <address@hidden>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -25,6 +25,8 @@
 #include "urldata.h"
 #include "curl_addrinfo.h"
 
+#ifndef CURL_DISABLE_DOH
+
 /*
  * Curl_doh() resolve a name using DoH (DNS-over-HTTPS). It resolves a name
  * and returns a 'Curl_addrinfo *' with the address information.
@@ -102,4 +104,10 @@ DOHcode doh_decode(unsigned char *doh,
                    struct dohentry *d);
 void de_cleanup(struct dohentry *d);
 #endif
+
+#else /* if DOH is disabled */
+#define Curl_doh(a,b,c,d) NULL
+#define Curl_doh_is_resolved(x,y) CURLE_COULDNT_RESOLVE_HOST
+#endif
+
 #endif /* HEADER_CURL_DOH_H */
diff --git a/lib/urldata.h b/lib/urldata.h
index 608b675df..af745f9d1 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -604,7 +604,9 @@ struct SingleRequest {
   char *upload_fromhere;
   void *protop;       /* Allocated protocol-specific data. Each protocol
                          handler makes sure this points to data it needs. */
+#ifndef CURL_DISABLE_DOH
   struct dohdata doh; /* DoH specific data for this request */
+#endif
   bit header:1;       /* incoming data has HTTP header */
   bit content_range:1; /* set TRUE if Content-Range: was found */
   bit upload_done:1;  /* set to TRUE when doing chunked transfer-encoding

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



reply via email to

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