Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-03-23 03:40:42 UTC
Modified files:
ChangeLog ircd/ircd_res.c
Log message:
Revert to earlier version of the DNS timeout fix.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.575 ircu2.10/ChangeLog:1.576
--- ircu2.10/ChangeLog:1.575 Tue Mar 22 19:16:36 2005
+++ ircu2.10/ChangeLog Tue Mar 22 19:40:28 2005
@@ -1,5 +1,10 @@
2005-03-22 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/ircd_res.c (check_resolver_timeout): I give up. Use the
+ kludgy earlier version of the timeout fix.
+
+2005-03-22 Michael Poole <[EMAIL PROTECTED]>
+
* ircd/channel.c (send_channel_modes): Fix test for when to send
membership mode suffix, to avoid sending it more than once.
Index: ircu2.10/ircd/ircd_res.c
diff -u ircu2.10/ircd/ircd_res.c:1.19 ircu2.10/ircd/ircd_res.c:1.20
--- ircu2.10/ircd/ircd_res.c:1.19 Tue Mar 22 19:16:38 2005
+++ ircu2.10/ircd/ircd_res.c Tue Mar 22 19:40:31 2005
@@ -18,7 +18,7 @@
*/
/** @file
* @brief IRC resolver functions.
- * @version $Id: ircd_res.c,v 1.19 2005/03/23 03:16:38 entrope Exp $
+ * @version $Id: ircd_res.c,v 1.20 2005/03/23 03:40:31 entrope Exp $
*/
#include "client.h"
@@ -278,7 +278,14 @@
{
if (when > CurrentTime + AR_TTL)
when = CurrentTime + AR_TTL;
- timer_add(&res_timeout, timeout_resolver, NULL, TT_ABSOLUTE, when);
+ /* TODO after 2.10.12: Rewrite the timer API because there should be
+ * no need for clients to know this kind of implementation detail. */
+ if (when > t_expire(&res_timeout))
+ /* do nothing */;
+ else if (t_onqueue(&res_timeout) && !(res_timeout.t_header.gh_flags &
GEN_MARKED))
+ timer_chg(&res_timeout, TT_ABSOLUTE, when);
+ else
+ timer_add(&res_timeout, timeout_resolver, NULL, TT_ABSOLUTE, when);
}
/** Drop pending DNS lookups which have timed out.
----------------------- End of diff -----------------------