From: Kai Blin Date: Wed, 29 Oct 2014 12:36:58 +0000 (+0100) Subject: dns: Just pass the name to create_response_rr X-Git-Tag: talloc-2.1.4~442 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e11c08d3e11c83b21e1366e9e91b6d841fbbd6c;p=thirdparty%2Fsamba.git dns: Just pass the name to create_response_rr Signed-off-by: Kai Blin Reviewed-by: Andreas Schneider --- diff --git a/source4/dns_server/dns_query.c b/source4/dns_server/dns_query.c index 3cafc23cd41..b510ccc2338 100644 --- a/source4/dns_server/dns_query.c +++ b/source4/dns_server/dns_query.c @@ -40,7 +40,7 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_DNS -static WERROR create_response_rr(const struct dns_name_question *question, +static WERROR create_response_rr(const char *name, const struct dnsp_DnssrvRpcRecord *rec, struct dns_res_rec **answers, uint16_t *ancount) { @@ -116,7 +116,7 @@ static WERROR create_response_rr(const struct dns_name_question *question, return DNS_ERR(NOT_IMPLEMENTED); } - ans[ai].name = talloc_strdup(ans, question->name); + ans[ai].name = talloc_strdup(ans, name); W_ERROR_HAVE_NO_MEMORY(ans[ai].name); ans[ai].rr_type = rec->wType; ans[ai].rr_class = DNS_QCLASS_IN; @@ -299,7 +299,7 @@ static WERROR handle_question(struct dns_server *dns, } /* First put in the CNAME record */ - werror = create_response_rr(question, &recs[ri], &ans, &ai); + werror = create_response_rr(question->name, &recs[ri], &ans, &ai); if (!W_ERROR_IS_OK(werror)) { return werror; } @@ -329,7 +329,7 @@ static WERROR handle_question(struct dns_server *dns, werror_return = WERR_OK; continue; } - werror = create_response_rr(question, &recs[ri], &ans, &ai); + werror = create_response_rr(question->name, &recs[ri], &ans, &ai); if (!W_ERROR_IS_OK(werror)) { return werror; }