X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=net%2Fadns.lua;h=d0151c8c31a4721b3bddfff472d17a32092b4f04;hb=d67b44d083d688733b9e4f8fe66e0b4c6995dccb;hp=0121881ae09ced15be6b77c0c7566171daa38405;hpb=1acdf9ae6809b65639bdb961ca697c52787608a4;p=prosody.git diff --git a/net/adns.lua b/net/adns.lua index 0121881a..d0151c8c 100644 --- a/net/adns.lua +++ b/net/adns.lua @@ -1,6 +1,6 @@ -- Prosody IM --- Copyright (C) 2008-2009 Matthew Wild --- Copyright (C) 2008-2009 Waqas Hussain +-- Copyright (C) 2008-2010 Matthew Wild +-- Copyright (C) 2008-2010 Waqas Hussain -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. @@ -36,12 +36,9 @@ function lookup(handler, qname, qtype, qclass) end)(dns.peek(qname, qtype, qclass)); end -function cancel(handle, call_handler) +function cancel(handle, call_handler, reason) log("warn", "Cancelling DNS lookup for %s", tostring(handle[3])); - dns.cancel(handle); - if call_handler then - coroutine.resume(handle[4]); - end + dns.cancel(handle[1], handle[2], handle[3], handle[4], call_handler); end function new_async_socket(sock, resolver)