From: Wouter Wijngaards Date: Wed, 6 Feb 2008 13:10:40 +0000 (+0000) Subject: result_free to resolve_free (thanks Benno). X-Git-Tag: release-0.9~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9a47f8b41fc47f914a4911b48fe49774d06a8a4;p=thirdparty%2Funbound.git result_free to resolve_free (thanks Benno). git-svn-id: file:///svn/unbound/trunk@924 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 65a81cbeb..a7d52bf0d 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - clearer explanation of threading configure options. - fixup asynclook test for nothreading (it creates only one process to do the extended test). + - changed name of ub_val_result_free to ub_val_resolve_free. 5 February 2008: Wouter - statistics-interval: seconds option added. diff --git a/doc/libunbound.3 b/doc/libunbound.3 index 3bee1e605..ead195dbb 100644 --- a/doc/libunbound.3 +++ b/doc/libunbound.3 @@ -31,7 +31,7 @@ .B ub_val_resolve, .B ub_val_resolve_async, .B ub_val_cancel, -.B ub_val_result_free, +.B ub_val_resolve_free, .B ub_val_strerror \- Unbound DNS validating resolver @version@ functions. .SH "SYNOPSIS" @@ -102,7 +102,7 @@ \fBub_val_cancel\fR(\fIstruct ub_val_ctx*\fR ctx, \fIint\fR async_id); .LP \fIvoid\fR -\fBub_val_result_free\fR(\fIstruct ub_val_result*\fR result); +\fBub_val_resolve_free\fR(\fIstruct ub_val_result*\fR result); .LP \fIconst char *\fR \fBub_val_strerror\fR(\fIint\fR err); @@ -251,7 +251,7 @@ and cancel the request if needed. .B ub_val_cancel Cancel an async query in progress. .TP -.B ub_val_result_free +.B ub_val_resolve_free Free struct ub_val_result contents after use. .TP .B ub_val_strerror diff --git a/libunbound/context.c b/libunbound/context.c index 39eb236b3..e95ca7953 100644 --- a/libunbound/context.c +++ b/libunbound/context.c @@ -99,7 +99,7 @@ void context_query_delete(struct ctx_query* q) { if(!q) return; - ub_val_result_free(q->res); + ub_val_resolve_free(q->res); free(q->msg); free(q); } diff --git a/libunbound/ubsyms.def b/libunbound/ubsyms.def index ed1ebbf6d..94776a02e 100644 --- a/libunbound/ubsyms.def +++ b/libunbound/ubsyms.def @@ -15,5 +15,5 @@ ub_val_process ub_val_resolve ub_val_resolve_async ub_val_cancel -ub_val_result_free +ub_val_resolve_free ub_val_strerror diff --git a/libunbound/unbound.c b/libunbound/unbound.c index a4eb88bc3..192cb8ba1 100644 --- a/libunbound/unbound.c +++ b/libunbound/unbound.c @@ -397,7 +397,7 @@ process_answer_detail(struct ub_val_ctx* ctx, uint8_t* msg, uint32_t len, } if(*err) { *res = NULL; - ub_val_result_free(q->res); + ub_val_resolve_free(q->res); } else { /* parse the message, extract rcode, fill result */ ldns_buffer* buf = ldns_buffer_new(q->msg_len); @@ -668,7 +668,7 @@ ub_val_cancel(struct ub_val_ctx* ctx, int async_id) } void -ub_val_result_free(struct ub_val_result* result) +ub_val_resolve_free(struct ub_val_result* result) { char** p; if(!result) return; diff --git a/libunbound/unbound.h b/libunbound/unbound.h index aa6b81a14..62436f070 100644 --- a/libunbound/unbound.h +++ b/libunbound/unbound.h @@ -105,7 +105,7 @@ struct ub_val_ctx; /** * The validation and resolution results. * Allocated by the resolver, and need to be freed by the application - * with ub_val_result_free(). + * with ub_val_resolve_free(). */ struct ub_val_result { /** The original question, name text string. */ @@ -187,7 +187,7 @@ struct ub_val_result { * are forthcoming. * struct result: pointer to more detailed result structure. * This structure is allocated on the heap and needs to be - * freed with ub_val_result_free(result); + * freed with ub_val_resolve_free(result); */ typedef void (*ub_val_callback_t)(void*, int, struct ub_val_result*); @@ -196,7 +196,7 @@ typedef void (*ub_val_callback_t)(void*, int, struct ub_val_result*); * @return a new context. default initialisation. * returns NULL on error. */ -struct ub_val_ctx* ub_val_ctx_create(); +struct ub_val_ctx* ub_val_ctx_create(void); /** * Destroy a validation context and free all its resources. @@ -409,7 +409,7 @@ int ub_val_cancel(struct ub_val_ctx* ctx, int async_id); * Free storage associated with a result structure. * @param result: to free */ -void ub_val_result_free(struct ub_val_result* result); +void ub_val_resolve_free(struct ub_val_result* result); /** * Convert error value to a human readable string. diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index 1a11a3c1f..15c494deb 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -349,7 +349,7 @@ dnslook(struct ub_val_ctx* ctx, char* q, int t, int c, int docname) } pretty_output(q, t, c, result, docname); ret = result->nxdomain; - ub_val_result_free(result); + ub_val_resolve_free(result); return ret; } diff --git a/testcode/asynclook.c b/testcode/asynclook.c index 8c8f79098..2f284fc4d 100644 --- a/testcode/asynclook.c +++ b/testcode/asynclook.c @@ -243,7 +243,7 @@ ext_callback(void* mydata, int err, struct ub_val_result* result) pi.err = 0; print_result(&pi); } - ub_val_result_free(result); + ub_val_resolve_free(result); } /** extended thread worker */ @@ -451,7 +451,7 @@ int main(int argc, char** argv) /* print lookup results */ for(i=0; i