summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-02 15:30:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:00 -0500
commit363d2f69a8220c61786286778070be546108f780 (patch)
tree24d5a3d29287ac6f9c8cc6a90556e17ee012c5e3
parent99b344eb14f528201381b20e127a131d2c2dff24 (diff)
downloadsamba-363d2f69a8220c61786286778070be546108f780.tar.gz
samba-363d2f69a8220c61786286778070be546108f780.tar.bz2
samba-363d2f69a8220c61786286778070be546108f780.zip
r12021: remove shortpath for winsdb_lookup, this isn't needed
metze (This used to be commit 8fb07b1ea8fdf353da832212289aceef20495bda)
-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);