-#ifdef HAVE_LIBADNS
- if ((err = adns_init(&ads,
- (adns_if_permit_ipv4 | adns_if_permit_ipv6 |
- adns_if_noserverwarn | adns_if_nosigpipe |
- adns_if_noautosys),
- 0)) != 0)
- die(EXIT_FAILURE, "failed to initialize ADNS: %s", strerror(errno));
- sel_addhook(&sel, &hook, before_select, after_select, 0);
-#else
- bres_init(&sel);
-#endif
+}
+
+/* --- @a_unlisten@ --- *
+ *
+ * Arguments: ---
+ *
+ * Returns: ---
+ *
+ * Use: Stops listening to the administration socket and removes it.
+ */
+
+void a_unlisten(void)
+{
+ if (!sockname) return;
+ sel_rmfile(&sock);
+ unlink(sockname);
+ close(sock.fd);
+}
+
+/* --- @a_switcherr@ --- *
+ *
+ * Arguments: ---
+ *
+ * Returns: ---
+ *
+ * Use: Arrange to report warnings, trace messages, etc. to
+ * administration clients rather than the standard-error stream.
+ *
+ * Obviously this makes no sense unless there is at least one
+ * client established. Calling @a_listen@ won't help with this,
+ * because the earliest a new client can connect is during the
+ * first select-loop iteration, which is too late: some initial
+ * client must have been added manually using @a_create@.
+ */
+
+void a_switcherr(void)
+{