summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/nbt_server/wins/winsdb.c11
-rw-r--r--source4/wrepl_server/wrepl_in_call.c2
2 files changed, 6 insertions, 7 deletions
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index bcec8da213..a81c3d55dc 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -395,7 +395,7 @@ NTSTATUS winsdb_lookup(struct ldb_context *wins_db,
talloc_steal(tmp_ctx, res);
- status = winsdb_record(res->msgs[0], name, tmp_ctx, &rec);
+ status = winsdb_record(res->msgs[0], tmp_ctx, &rec);
if (!NT_STATUS_IS_OK(status)) goto failed;
/* see if it has already expired */
@@ -416,11 +416,12 @@ failed:
return status;
}
-NTSTATUS winsdb_record(struct ldb_message *msg, struct nbt_name *name, TALLOC_CTX *mem_ctx, struct winsdb_record **_rec)
+NTSTATUS winsdb_record(struct ldb_message *msg, TALLOC_CTX *mem_ctx, struct winsdb_record **_rec)
{
NTSTATUS status;
struct winsdb_record *rec;
struct ldb_message_element *el;
+ struct nbt_name *name;
uint32_t i, num_values;
rec = talloc(mem_ctx, struct winsdb_record);
@@ -429,10 +430,8 @@ NTSTATUS winsdb_record(struct ldb_message *msg, struct nbt_name *name, TALLOC_CT
goto failed;
}
- if (!name) {
- status = winsdb_nbt_name(rec, msg->dn, &name);
- if (!NT_STATUS_IS_OK(status)) goto failed;
- }
+ status = winsdb_nbt_name(rec, msg->dn, &name);
+ if (!NT_STATUS_IS_OK(status)) goto failed;
if (strlen(name->name) > 15) {
status = NT_STATUS_INTERNAL_DB_CORRUPTION;
diff --git a/source4/wrepl_server/wrepl_in_call.c b/source4/wrepl_server/wrepl_in_call.c
index 0dd8095dd2..718442a288 100644
--- a/source4/wrepl_server/wrepl_in_call.c
+++ b/source4/wrepl_server/wrepl_in_call.c
@@ -265,7 +265,7 @@ static NTSTATUS wreplsrv_in_send_request(struct wreplsrv_in_call *call)
NT_STATUS_HAVE_NO_MEMORY(names);
for (i = 0; i < res->count; i++) {
- status = winsdb_record(res->msgs[i], NULL, call, &rec);
+ status = winsdb_record(res->msgs[i], call, &rec);
NT_STATUS_NOT_OK_RETURN(status);
status = wreplsrv_record2wins_name(names, call->wreplconn->our_ip, &names[i], rec);