/*
- * $Id: dns.cc,v 1.47 1998/01/02 18:15:32 wessels Exp $
+ * $Id: dns.cc,v 1.48 1998/01/02 22:03:41 wessels Exp $
*
* DEBUG: section 34 Dnsserver interface
* AUTHOR: Harvest Derived
debug(34, 3) ("dnsShutdownServers:\n");
+#if OLD_CODE
+ /*
+ * We used to do this when we waited for all active connections
+ * to close before reconfiguring.
+ */
k = ipcacheQueueDrain();
if (fqdncacheQueueDrain() || k)
return;
+#endif
for (k = 0; k < NDnsServersAlloc; k++) {
dns = *(dns_child_table + k);
if (!EBIT_TEST(dns->flags, HELPER_ALIVE)) {
/*
- * $Id: fqdncache.cc,v 1.75 1997/12/30 02:47:41 wessels Exp $
+ * $Id: fqdncache.cc,v 1.76 1998/01/02 22:03:41 wessels Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
fqdncache_call_pending(f);
}
fqdncacheUnlockEntry(f); /* unlock from FQDN_DISPATCHED */
+ } else {
+ debug(14, 5) ("fqdncache_dnsHandleRead: Incomplete reply\n");
+ commSetSelect(fd,
+ COMM_SELECT_READ,
+ fqdncache_dnsHandleRead,
+ dnsData,
+ 0);
}
if (dnsData->offset == 0) {
dnsData->data = NULL;
EBIT_CLR(dnsData->flags, HELPER_BUSY);
+ if (EBIT_TEST(dnsData->flags, HELPER_SHUTDOWN))
+ dnsShutdownServer(dnsData);
+ cbdataUnlock(dnsData);
}
- /* reschedule */
- commSetSelect(dnsData->inpipe,
- COMM_SELECT_READ,
- fqdncache_dnsHandleRead,
- dnsData, 0);
fqdncacheNudgeQueue();
}
NULL, /* Handler */
NULL, /* Handler-data */
xfree);
+ cbdataLock(dns);
commSetSelect(dns->outpipe,
COMM_SELECT_READ,
fqdncache_dnsHandleRead,
return buf;
}
+#if OLD_CODE
int
fqdncacheQueueDrain(void)
{
fqdncache_dnsDispatch(dnsData, i);
return 1;
}
+#endif
static void
fqdncacheLockEntry(fqdncache_entry * f)
/*
- * $Id: ipcache.cc,v 1.151 1997/12/30 02:47:42 wessels Exp $
+ * $Id: ipcache.cc,v 1.152 1998/01/02 22:03:40 wessels Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
return &static_addrs;
}
+#if OLD_CODE
int
ipcacheQueueDrain(void)
{
ipcacheNudgeQueue();
return 1;
}
+#endif
static void
ipcacheLockEntry(ipcache_entry * i)