No point in defaulting try-dns-srv to on if we don't have SRV support.
authorDavid Shaw <dshaw@jabberwocky.com>
Tue, 18 Dec 2012 05:08:51 +0000 (00:08 -0500)
committerDavid Shaw <dshaw@jabberwocky.com>
Tue, 18 Dec 2012 05:08:51 +0000 (00:08 -0500)
* keyserver/gpgkeys_hkp.c (main): Only default try-dns-srv to on if we
  have SRV support in the first place.

keyserver/gpgkeys_hkp.c

index 8e35783..73f5e56 100644 (file)
@@ -629,13 +629,20 @@ show_help (FILE *fp)
 int
 main(int argc,char *argv[])
 {
-  int arg,ret=KEYSERVER_INTERNAL_ERROR,try_srv=1;
+  int arg,ret=KEYSERVER_INTERNAL_ERROR;
   char line[MAX_LINE];
   int failed=0;
   struct keylist *keylist=NULL,*keyptr=NULL;
   char *proxy=NULL;
   struct curl_slist *headers=NULL,*resolve=NULL;
 
+  /* Only default this to on if we have SRV support */
+#ifdef USE_DNS_SRV
+  int try_srv = 1;
+#else
+  int try_srv = 0;
+#endif
+
   console=stderr;
 
   /* Kludge to implement standard GNU options.  */