From: Wouter Wijngaards Date: Mon, 3 Dec 2007 18:45:56 +0000 (+0000) Subject: Small edits, work on design to make it work. X-Git-Tag: release-0.9~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c33240c16248c668a030641c60f05c9fde2bcd9;p=thirdparty%2Funbound.git Small edits, work on design to make it work. git-svn-id: file:///svn/unbound/trunk@800 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/libunbound/unbound.c b/libunbound/unbound.c index cdae6ec45..bf9d236b0 100644 --- a/libunbound/unbound.c +++ b/libunbound/unbound.c @@ -67,9 +67,14 @@ struct ub_val_ctx { /** configuration options */ struct config_file* cfg; - /** do threading (instead of forking) */ + /** do threading (instead of forking) for async resolution */ int dothread; + /** shared data */ + /* list of alloc-cache-id points and nextthreadnum */ + /*struct shareddata* shared;*/ + /** outstanding querylist and next querynum (to try) */ + /** shared caches, and so on */ struct alloc_cache superalloc; /** module env master value */ @@ -145,8 +150,6 @@ ub_val_ctx_delete(struct ub_val_ctx* ctx) close(ctx->rrpipe[1]); config_delete(ctx->cfg); free(ctx); - checklock_stop(); /* assumes during checklock tests libunbound users - only create one context */ } int @@ -239,6 +242,7 @@ ub_val_ctx_fd(struct ub_val_ctx* ctx) int ub_val_ctx_process(struct ub_val_ctx* ctx) { + /* TODO */ return UB_NOMEM; } @@ -248,6 +252,7 @@ ub_val_resolve(struct ub_val_ctx* ctx, char* name, int rrtype, { /* become a resolver thread for a bit */ + /* TODO */ return UB_NOMEM; } @@ -255,12 +260,14 @@ int ub_val_resolve_async(struct ub_val_ctx* ctx, char* name, int rrtype, int rrclass, void* mydata, ub_val_callback_t callback, int* async_id) { + /* TODO */ return UB_NOMEM; } int ub_val_cancel(struct ub_val_ctx* ctx, int async_id) { + /* TODO */ return UB_NOMEM; } diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index 9780314d2..af4e93f68 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -164,8 +164,8 @@ static const char* statstr(int sec, struct ub_val_result* result) { if(sec) return "[secure]"; - if(result->bogus) return "[not-secure (BOGUS)]"; - return "[not-secure (insecure)]"; + if(result->bogus) return "[BOGUS (security failure)]"; + return "[insecure]"; } /** nice string for type */