aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-05-19 19:59:21 -0700
committerGuy Harris <guy@alum.mit.edu>2018-05-20 03:00:26 +0000
commit8ee56d29828c23e45fa771d6b8f50b74e9185a14 (patch)
tree88f2b76ae7509cc8b2cef175c376b3405df72217 /epan/addr_resolv.c
parent724877497a7eab2cb28d5531233e083fcf9ed253 (diff)
Get rid of add_async_dns_ipv4().
We don't have add_async_dns_ipv6(), we just do the same stuff inline in host_lookup6(); this removes an irrelevant difference between host_lookup() and host_lookup6(). Change-Id: Ib4aa1783ddec1bc390e2a7f64c87f1c8441fa849 Reviewed-on: https://code.wireshark.org/review/27661 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/addr_resolv.c')
-rw-r--r--epan/addr_resolv.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index f918d92eca..b71231877b 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -345,18 +345,6 @@ static ares_channel ghbn_chan; /* ares_gethostbyname -- Usually interactive, tim
static gboolean async_dns_initialized = FALSE;
static guint async_dns_in_flight = 0;
static wmem_list_t *async_dns_queue_head = NULL;
-
-/* push a dns request */
-static void
-add_async_dns_ipv4(int type, guint32 addr)
-{
- async_dns_queue_msg_t *msg;
-
- msg = wmem_new(wmem_epan_scope(), async_dns_queue_msg_t);
- msg->family = type;
- msg->addr.ip4 = addr;
- wmem_list_append(async_dns_queue_head, (gpointer) msg);
-}
#endif /* HAVE_C_ARES */
typedef struct {
@@ -861,6 +849,9 @@ static hashipv4_t *
host_lookup(const guint addr)
{
hashipv4_t * volatile tp;
+#ifdef HAVE_C_ARES
+ async_dns_queue_msg_t *caqm;
+#endif
tp = (hashipv4_t *)wmem_map_lookup(ipv4_hash_table, GUINT_TO_POINTER(addr));
if (tp == NULL) {
@@ -888,7 +879,10 @@ host_lookup(const guint addr)
#ifdef HAVE_C_ARES
if (async_dns_initialized && name_resolve_concurrency > 0) {
- add_async_dns_ipv4(AF_INET, addr);
+ caqm = wmem_new(wmem_epan_scope(), async_dns_queue_msg_t);
+ caqm->family = AF_INET;
+ caqm->addr.ip4 = addr;
+ wmem_list_append(async_dns_queue_head, (gpointer) caqm);
}
#endif
}