1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-04-17 15:44:34 +02:00

Fixed indentation and indented cpp directives

--
This commit is contained in:
Werner Koch 2012-12-19 15:30:17 +01:00
parent d23ec86095
commit 20c95ef258
2 changed files with 62 additions and 58 deletions

View File

@ -1544,9 +1544,11 @@ connect_server (const char *server, unsigned short port,
unsigned int flags, struct http_srv *srv)
{
int sock = -1;
int srvcount = 0, fakesrv = 0;
int srvcount = 0;
int fakesrv = 0;
int hostfound = 0;
int srvindex, connected, chosen=-1;
int srvindex, connected;
int chosen = -1;
int last_errno = 0;
struct srventry *serverlist = NULL;
@ -1714,7 +1716,7 @@ connect_server (const char *server, unsigned short port,
}
#endif /* !HAVE_GETADDRINFO */
if(!fakesrv && chosen>-1 && srv)
if(!fakesrv && chosen >- 1 && srv)
{
srv->used_server = xstrdup (serverlist[chosen].target);
srv->used_port = serverlist[chosen].port;

View File

@ -36,29 +36,30 @@
#include <errno.h>
#include <unistd.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
# include <getopt.h>
#endif
#ifdef HAVE_LIBCURL
#include <curl/curl.h>
# include <curl/curl.h>
/* This #define rigamarole is to enable a hack to fake DNS SRV using
libcurl. It only works if we have getaddrinfo(), inet_ntop(), and
a modern enough version of libcurl (7.21.3) so we can use
CURLOPT_RESOLVE to feed the resolver from the outside to force
libcurl to pass the right SNI. */
#if defined(HAVE_GETADDRINFO) && defined(HAVE_INET_NTOP) && LIBCURL_VERNUM >= 0x071503
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
# if (defined(HAVE_GETADDRINFO) && defined(HAVE_INET_NTOP) \
&& LIBCURL_VERNUM >= 0x071503)
# include <sys/types.h>
# include <sys/socket.h>
# include <netdb.h>
# include <arpa/inet.h>
# else
# undef USE_DNS_SRV
# endif
#else
#undef USE_DNS_SRV
#endif
#else
#include "curl-shim.h"
# include "curl-shim.h"
#endif
#include "util.h"
#ifdef USE_DNS_SRV
#include "srv.h"
# include "srv.h"
#endif
#include "keyserver.h"
#include "ksutil.h"
@ -73,9 +74,10 @@ static char errorbuffer[CURL_ERROR_SIZE];
static char *proto,*port;
static size_t
curl_mrindex_writer(const void *ptr,size_t size,size_t nmemb,void *stream)
curl_mrindex_writer (const void *ptr,size_t size,size_t nmemb,void *stream)
{
static int checked=0,swallow=0;
static int checked = 0;
static int swallow = 0;
if(!checked)
{