On 11 Nov 2005, at 16:09, Brian Grossman wrote:
A plugin can emit several unrelated queries before calling for a
CONTINUATION (mine does), so I think changing the Danga::DNS
callback
API will be necessary.
Actually I don't think it's that hard. Patch coming.
Does that work for you?
Doesn't this (from trunk/plugins/dnsbl):
- $qp->finish_continuation unless $pending;
+ $qp->finish_continuation if $qp->input_sock->readable;
make the continuation finish after the first callback, regardless
or what else may be in the response packet?
No, it should wait until the DNS.pm instance disappears (because its
DESTROY method sets $client->readable to on again).
I suspect this because trunk/lib/Danga/DNS.pm:new() sends
the query then immediately calls $client->enable_read().
Hmm - are you sure it doesn't set readable to off?
(Wow, lib/Danga/DNS has changed a lot since I last synced it to my
production branch.)
:-)
I'm using it for other production stuff (outside of Qpsmtpd - such as
processing log files and doing hundreds of thousands of DNS queries -
and it really rocks for that), so needed it to be a bit more complete.
Matt.