[PATCH 2/5] dns: Just pass the name to create_response_rr
Kai Blin
kai at samba.org
Thu Jul 30 09:53:21 UTC 2015
Signed-off-by: Kai Blin <kai at samba.org>
---
source4/dns_server/dns_query.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/source4/dns_server/dns_query.c b/source4/dns_server/dns_query.c
index 4e3c6cc..901d6b9 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)
{
@@ -115,7 +115,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;
@@ -298,7 +298,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;
}
@@ -332,7 +332,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;
}
--
1.9.1
More information about the samba-technical
mailing list