From fbc3b2d6a86bf711ad033af49b8237b4bf3b1844 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Thu, 22 Oct 2015 12:13:40 +0200 Subject: [PATCH] Use the NOT_IMPLEMENTED return code! --- src/context.c | 4 ++++ src/general.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/context.c b/src/context.c index 8f0669e1..c3f5b8b1 100644 --- a/src/context.c +++ b/src/context.c @@ -1185,6 +1185,10 @@ getdns_context_set_resolution_type(struct getdns_context *context, if (value != GETDNS_RESOLUTION_STUB && value != GETDNS_RESOLUTION_RECURSING) { return GETDNS_RETURN_CONTEXT_UPDATE_FAIL; } +#ifndef HAVE_LIBUNBOUND + if (value == GETDNS_RESOLUTION_RECURSING) + return GETDNS_RETURN_NOT_IMPLEMENTED; +#endif #ifndef STUB_NATIVE_DNSSEC if (context->resolution_type_set != 0) { /* already setup */ diff --git a/src/general.c b/src/general.c index 39bb1b0e..2cb9b0f0 100644 --- a/src/general.c +++ b/src/general.c @@ -166,7 +166,7 @@ submit_network_request(getdns_network_req *netreq) netreq, ub_resolve_callback, &(netreq->unbound_id)) ? GETDNS_RETURN_GENERIC_ERROR : GETDNS_RETURN_GOOD; #else - return GETDNS_RETURN_GENERIC_ERROR; + return GETDNS_RETURN_NOT_IMPLEMENTED; #endif } /* Submit with stub resolver */