UNUSED(msgbuf);
+ dig_idnsetup(query->lookup, true);
+
styleflags |= DNS_STYLEFLAG_REL_OWNER;
if (yaml) {
msg->indent.string = " ";
if (style != NULL) {
dns_master_styledestroy(&style, mctx);
}
+
+ dig_idnsetup(query->lookup, false);
+
return (result);
}
#ifdef HAVE_LIBIDN2
char idn_origin[MXNAME], idn_textname[MXNAME];
-
- result = dns_name_settotextfilter(lookup->idnout ? idn_output_filter
- : NULL);
- check_result(result, "dns_name_settotextfilter");
#endif /* HAVE_LIBIDN2 */
INSIST(!free_now);
*/
void
destroy_libs(void) {
-#ifdef HAVE_LIBIDN2
- isc_result_t result;
-#endif /* HAVE_LIBIDN2 */
-
if (keep != NULL) {
isc_nmhandle_detach(&keep);
}
clear_searchlist();
-#ifdef HAVE_LIBIDN2
- result = dns_name_settotextfilter(NULL);
- check_result(result, "dns_name_settotextfilter");
-#endif /* HAVE_LIBIDN2 */
-
if (commctx != NULL) {
debug("freeing commctx");
isc_mempool_destroy(&commctx);
*dst = local_src;
}
#endif /* HAVE_LIBIDN2 */
+
+void
+dig_idnsetup(dig_lookup_t *lookup, bool active) {
+#ifdef HAVE_LIBIDN2
+ isc_result_t result;
+ result = dns_name_settotextfilter(
+ (active && lookup->idnout) ? idn_output_filter : NULL);
+ check_result(result, "dns_name_settotextfilter");
+#else
+ UNUSED(lookup);
+ UNUSED(active);
+ return;
+#endif /* HAVE_LIBIDN2 */
+}
* Routines exported from dig.c for use by dig for iOS
*/
-/*%<
+/*%
* Call once only to set up libraries, parse global
* parameters and initial command line query parameters
*/
void
dig_setup(int argc, char **argv);
-/*%<
+/*%
* Call to supply new parameters for the next lookup
*/
void
dig_query_setup(bool, bool, int argc, char **argv);
-/*%<
+/*%
* set the main application event cycle running
*/
void
dig_startup(void);
-/*%<
+/*%
* Initiates the next lookup cycle
*/
void
dig_query_start(void);
-/*%<
+/*%
+ * Activate/deactivate IDN filtering of output.
+ */
+void
+dig_idnsetup(dig_lookup_t *lookup, bool active);
+
+/*%
* Cleans up the application
*/
void