nameserv: move fallback DNS_Name2IPAddressAsync() to stubs.c

This commit is contained in:
Miroslav Lichvar
2014-09-22 12:51:19 +02:00
parent b54711252b
commit f955b46c13
3 changed files with 19 additions and 21 deletions

17
stubs.c
View File

@@ -34,11 +34,28 @@
#include "logging.h"
#include "manual.h"
#include "nameserv.h"
#include "nameserv_async.h"
#include "ntp_core.h"
#include "ntp_io.h"
#include "ntp_sources.h"
#include "refclock.h"
#ifndef FEAT_ASYNCDNS
/* This is a blocking implementation used when asynchronous resolving is not available */
void
DNS_Name2IPAddressAsync(const char *name, DNS_NameResolveHandler handler, void *anything)
{
IPAddr addr;
DNS_Status status;
status = DNS_Name2IPAddress(name, &addr);
(handler)(status, &addr, anything);
}
#endif /* !FEAT_ASYNCDNS */
#ifndef FEAT_CMDMON
void