dovecot-2.2: lib-dns: Added dns_lookup_switch_ioloop()

dovecot at dovecot.org dovecot at dovecot.org
Wed Oct 31 13:12:42 EET 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/285a88e00231
changeset: 15362:285a88e00231
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Wed Oct 31 13:12:22 2012 +0200
description:
lib-dns: Added dns_lookup_switch_ioloop()

diffstat:

 src/lib-dns/dns-lookup.c |  7 +++++++
 src/lib-dns/dns-lookup.h |  2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)

diffs (24 lines):

diff -r 6b45225ab1d5 -r 285a88e00231 src/lib-dns/dns-lookup.c
--- a/src/lib-dns/dns-lookup.c	Wed Oct 31 13:11:11 2012 +0200
+++ b/src/lib-dns/dns-lookup.c	Wed Oct 31 13:12:22 2012 +0200
@@ -190,3 +190,10 @@
 {
 	dns_lookup_free(lookup);
 }
+
+void dns_lookup_switch_ioloop(struct dns_lookup *lookup)
+{
+	if (lookup->to != NULL)
+		lookup->to = io_loop_move_timeout(&lookup->to);
+	lookup->io = io_loop_move_io(&lookup->io);
+}
diff -r 6b45225ab1d5 -r 285a88e00231 src/lib-dns/dns-lookup.h
--- a/src/lib-dns/dns-lookup.h	Wed Oct 31 13:11:11 2012 +0200
+++ b/src/lib-dns/dns-lookup.h	Wed Oct 31 13:12:22 2012 +0200
@@ -39,4 +39,6 @@
 /* Abort the DNS lookup without calling the callback. */
 void dns_lookup_abort(struct dns_lookup **lookup);
 
+void dns_lookup_switch_ioloop(struct dns_lookup *lookup);
+
 #endif


More information about the dovecot-cvs mailing list