[344] Don't compile in async dns support by default for makefiles.
This commit is contained in:
parent
fb824e7f1e
commit
f0485d1398
@ -76,6 +76,9 @@ WITH_DOCS:=yes
|
||||
# Build with client support for SOCK5 proxy.
|
||||
WITH_SOCKS:=yes
|
||||
|
||||
# Build with async dns lookup support for bridges (temporary). Requires glibc.
|
||||
#WITH_ADNS:=yes
|
||||
|
||||
# =============================================================================
|
||||
# End of user configuration
|
||||
# =============================================================================
|
||||
@ -239,6 +242,11 @@ ifeq ($(WITH_EC),yes)
|
||||
BROKER_CFLAGS:=$(BROKER_CFLAGS) -DWITH_EC
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_ADNS),yes)
|
||||
BROKER_LIBS:=$(BROKER_LIBS) -lanl
|
||||
BROKER_CFLAGS:=$(BROKER_CFLAGS) -DWITH_ADNS
|
||||
endif
|
||||
|
||||
MAKE_ALL:=mosquitto
|
||||
ifeq ($(WITH_DOCS),yes)
|
||||
MAKE_ALL:=$(MAKE_ALL) docs
|
||||
|
@ -155,7 +155,7 @@ struct mosquitto {
|
||||
#ifndef WITH_BROKER
|
||||
mosq_sock_t sockpairR, sockpairW;
|
||||
#endif
|
||||
#ifdef __GLIBC__
|
||||
#if defined(__GLIBC__) && defined(WITH_ADNS)
|
||||
struct gaicb *adns; /* For getaddrinfo_a */
|
||||
#endif
|
||||
enum _mosquitto_protocol protocol;
|
||||
|
@ -271,7 +271,7 @@ static unsigned int psk_client_callback(SSL *ssl, const char *hint,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WITH_BROKER) && defined(__GLIBC__)
|
||||
#if defined(WITH_BROKER) && defined(__GLIBC__) && defined(WITH_ADNS)
|
||||
/* Async connect, part 1 (dns lookup) */
|
||||
int _mosquitto_try_connect_step1(struct mosquitto *mosq, const char *host)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ int mqtt3_bridge_new(struct mosquitto_db *db, struct _mqtt3_bridge *bridge)
|
||||
return MOSQ_ERR_NOMEM;
|
||||
}
|
||||
|
||||
#ifdef __GLIBC__
|
||||
#if defined(__GLIBC__) && defined(WITH_ADNS)
|
||||
new_context->bridge->restart_t = 1; /* force quick restart of bridge */
|
||||
return mqtt3_bridge_connect_step1(db, new_context);
|
||||
#else
|
||||
|
@ -247,7 +247,7 @@ int mosquitto_main_loop(struct mosquitto_db *db, mosq_sock_t *listensock, int li
|
||||
if((context->bridge->start_type == bst_lazy && context->bridge->lazy_reconnect)
|
||||
|| (context->bridge->start_type == bst_automatic && now > context->bridge->restart_t)){
|
||||
|
||||
#ifdef __GLIBC__
|
||||
#if defined(__GLIBC__) && defined(WITH_ADNS)
|
||||
if(context->adns){
|
||||
/* Waiting on DNS lookup */
|
||||
rc = gai_error(context->adns);
|
||||
|
Loading…
Reference in New Issue
Block a user