From d96ed629f9c58956ffa5aa2b27b22300fcb2d233 Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 3 Apr 2006 00:03:46 +0000 Subject: [PATCH] @@ -3,6 +3,9 @@ This prevents them turning up in Depends - see the README. + * Use correct variable name for cht_adnstcl_{queries,resolvers} + everywhere (prevents coredump accessing uninitialised version). + * Correct doc comment for supplying query options to adns asynch. --- adns/adns.c | 12 ++++++------ adns/adns.tct | 10 +++++----- adns/chiark_tcl_adns.h | 2 +- debian/changelog | 3 +++ 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/adns/adns.c b/adns/adns.c index 53a1b01..b924c07 100644 --- a/adns/adns.c +++ b/adns/adns.c @@ -20,7 +20,7 @@ * * adns asynch ON-YES ON-NO ON-DONTKNOW XARGS \ * TYPE DOMAIN \ - * [QUERY-OPTIONS] => QUERY-ID + * [QUERY-OPTIONS...] => QUERY-ID * calls, later, * [concat ON-YES|ON-NO|ON-DONTKNOW XARGS RESULTS] * adns asynch-cancel QUERY-ID @@ -323,7 +323,7 @@ static void destroy_resolver_defcb(ClientData resolver_v, Tcl_Interp *ip) { } int cht_do_adns_destroy_resolver(ClientData cd, Tcl_Interp *ip, void *res_v) { - cht_tabledataid_disposing(ip,res_v,&adnstcl_resolvers); + cht_tabledataid_disposing(ip,res_v,&cht_adnstcl_resolvers); destroy_resolver(ip,res_v); return TCL_OK; } @@ -429,7 +429,7 @@ static int oifn_resolver(Tcl_Interp *ip, const OptionInfo *oi, void *val_v; int rc; - rc= cht_pat_iddata(ip,arg,&val_v,&adnstcl_resolvers); + rc= cht_pat_iddata(ip,arg,&val_v,&cht_adnstcl_resolvers); if (rc) return rc; op->resolver= val_v; return TCL_OK; @@ -724,7 +724,7 @@ static void asynch_check_now(Resolver *res) { query= query_v; query->aqu= 0; - cht_tabledataid_disposing(interp, query, &adnstcl_queries); + cht_tabledataid_disposing(interp, query, &cht_adnstcl_queries); si= (!answer->status ? &query->on_yes : answer->status > adns_s_max_tempfail ? &query->on_no @@ -787,7 +787,7 @@ int cht_do_adns_asynch_cancel(ClientData cd, Tcl_Interp *ip, void *query_v) { } static void asynch_query_dispose(Tcl_Interp *interp, Query *query) { - cht_tabledataid_disposing(interp, query, &adnstcl_queries); + cht_tabledataid_disposing(interp, query, &cht_adnstcl_queries); cht_scriptinv_cancel(&query->on_yes); cht_scriptinv_cancel(&query->on_no); cht_scriptinv_cancel(&query->on_fail); @@ -800,7 +800,7 @@ static void destroy_query_idtabcb(Tcl_Interp *interp, void *query_v) { asynch_query_dispose(interp, query_v); } -const IdDataSpec adnstcl_queries= { +const IdDataSpec cht_adnstcl_queries= { "adns", "adns-query-table", destroy_query_idtabcb }; diff --git a/adns/adns.tct b/adns/adns.tct index dbb700c..a1c2756 100644 --- a/adns/adns.tct +++ b/adns/adns.tct @@ -45,14 +45,14 @@ Table adns Adns_SubCommand rrtype enum(AdnsTclRRTypeInfo/, "rrtype") domain string ... obj - => iddata(&adnstcl_queries) + => iddata(&cht_adnstcl_queries) asynch-cancel - query iddata(&adnstcl_queries) + query iddata(&cht_adnstcl_queries) new-resolver ... obj - => iddata(&adnstcl_resolvers) + => iddata(&cht_adnstcl_resolvers) set-default-resolver - res iddata(&adnstcl_resolvers) + res iddata(&cht_adnstcl_resolvers) destroy-resolver - res iddata(&adnstcl_resolvers) + res iddata(&cht_adnstcl_resolvers) diff --git a/adns/chiark_tcl_adns.h b/adns/chiark_tcl_adns.h index f450f4a..eec6d21 100644 --- a/adns/chiark_tcl_adns.h +++ b/adns/chiark_tcl_adns.h @@ -28,7 +28,7 @@ typedef struct { adns_rrtype number; } AdnsTclRRTypeInfo; -const IdDataSpec adnstcl_queries, adnstcl_resolvers; +extern const IdDataSpec cht_adnstcl_queries, cht_adnstcl_resolvers; #include "adns+tcmdif.h" diff --git a/debian/changelog b/debian/changelog index 6b91a92..40bba4b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ chiark-tcl (1.0.1) unstable; urgency=low * Do not run dpkg-shlibdeps on adns and nettle plugins. This prevents them turning up in Depends - see the README. * Use correct syntax for avoiding compressing doc/*/*.[ch].txt. + * Use correct variable name for cht_adnstcl_{queries,resolvers} + everywhere (prevents coredump accessing uninitialised version). + * Correct doc comment for supplying query options to adns asynch. -- -- 2.30.2