X-Git-Url: http://git.pk910.de/?p=NextIRCd.git;a=blobdiff_plain;f=src%2FIODNSLookup.c;h=5497553c5c2970180d379495fd2a15f1bbd5c07c;hp=3024f8400dba7dd67830944ff559d6d14690d421;hb=e69f0fb3c41956a73f05dcaa43fd66d63e5b748b;hpb=1c31fc37d833b9d289dceb6ae5e6b32f0ccff824 diff --git a/src/IODNSLookup.c b/src/IODNSLookup.c index 3024f84..5497553 100644 --- a/src/IODNSLookup.c +++ b/src/IODNSLookup.c @@ -19,6 +19,7 @@ #include "IOHandler.h" #include "IODNSLookup.h" #include "IOLog.h" +#include "IOSockets.h" #ifdef HAVE_PTHREAD_H pthread_mutex_t iodns_sync; @@ -41,6 +42,7 @@ static void iodns_init_engine() { iohandler_log(IOLOG_FATAL, "found no useable IO DNS engine"); return; } + iohandler_log(IOLOG_DEBUG, "using %s IODNS engine", dnsengine->name); } void _init_iodns() { @@ -105,6 +107,7 @@ void iodns_event_callback(struct _IODNSQuery *query, enum IODNSEventType state) struct IODNSEvent event; event.type = state; event.query = descriptor; + event.result = query->result; descriptor->parent = NULL; _stop_dnsquery(query); @@ -113,6 +116,16 @@ void iodns_event_callback(struct _IODNSQuery *query, enum IODNSEventType state) descriptor->callback(&event); iogc_add(descriptor); + } else if((query->flags & IODNSFLAG_PARENT_SOCKET)) { + struct IODNSEvent event; + event.type = state; + event.query = NULL; + event.result = query->result + void *parent = query->parent; + + _stop_dnsquery(query); + iosocket_lookup_callback(parent, &event); + } }