/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "net.h"
#include "str.h"
#include "hash.h"
#include "array.h"
#include "llist.h"
#include "ioloop.h"
#include "istream.h"
#include "ostream.h"
#include "time-util.h"
#include "dns-lookup.h"
#include "http-response-parser.h"
#include "http-client-private.h"
static void
static void
const char *error);
static bool
/*
* Host (shared)
*/
static void
{
}
static void
struct http_client_host_shared *hshared)
{
int timeout = 0;
return;
if (!http_client_host_is_idle(host))
return;
}
}
}
static void
const char *error)
{
}
}
static void
struct http_client_host_shared *hshared)
{
/* lookup failed */
return;
}
/* notify all sessions */
}
}
static void http_client_host_shared_lookup
(struct http_client_host_shared *hshared)
{
int ret;
} else {
unsigned int ips_count;
if (ret != 0) {
return;
}
"DNS lookup successful; got %d IPs", ips_count);
}
}
}
static int
{
if (hshared->unix_local)
return 0;
if (hshared->explicit_ip)
return 0;
return -1;
return 0;
return 0;
return -1;
}
{
// FIXME: limit the maximum number of inactive cached hosts
return hshared;
}
static struct http_client_host_shared *
(struct http_client_context *cctx,
{
}
} else {
}
}
}
return hshared;
}
{
else
/* drop client sessions */
}
}
static void
struct http_client_host_shared *hshared)
{
/* cancel host idle timeout */
}
struct http_client_host_shared *hshared)
{
}
/*
* Host
*/
struct http_client_host *
{
break;
}
}
return host;
}
void http_client_host_free(
struct http_client_host **_host)
{
/* drop request queues */
}
}
static void
struct http_client_host *host)
{
unsigned int requests = 0;
/* notify all queues */
}
}
static void
const char *error)
{
}
struct http_client_request *req)
{
const char *error;
if (http_client_peer_addr_is_https(&addr) &&
return;
}
}
/* add request to queue */
/* queue will trigger host lookup once the request is activated
(may be delayed) */
}
static bool
{
unsigned int requests = 0;
}
return (requests > 0);
}
{
}
{
}
{
unsigned int i;
*idx_r = i;
return TRUE;
}
}
return FALSE;
}
{
}