summaryrefslogtreecommitdiff
path: root/source4/wrepl_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/wrepl_server')
-rw-r--r--source4/wrepl_server/wrepl_in_call.c13
-rw-r--r--source4/wrepl_server/wrepl_server.c6
2 files changed, 7 insertions, 12 deletions
diff --git a/source4/wrepl_server/wrepl_in_call.c b/source4/wrepl_server/wrepl_in_call.c
index ab86aa209f..4472a0fede 100644
--- a/source4/wrepl_server/wrepl_in_call.c
+++ b/source4/wrepl_server/wrepl_in_call.c
@@ -263,8 +263,8 @@ static NTSTATUS wreplsrv_in_send_request(struct wreplsrv_in_call *call)
return NT_STATUS_OK;
}
- filter = talloc_asprintf(call, "(&(winsOwner=%s)(objectClass=wins)(active=1)(version>=%llu)(version<=%llu))",
- owner->owner.address, owner_in->min_version, owner_in->max_version);
+ filter = talloc_asprintf(call, "(&(winsOwner=%s)(objectClass=winsRecord)(state>=%u)(versionID>=%llu)(versionID<=%llu))",
+ owner->owner.address, WINS_REC_ACTIVE, owner_in->min_version, owner_in->max_version);
NT_STATUS_HAVE_NO_MEMORY(filter);
ret = ldb_search(service->wins_db, NULL, LDB_SCOPE_SUBTREE, filter, NULL, &res);
if (res != NULL) {
@@ -277,13 +277,8 @@ static NTSTATUS wreplsrv_in_send_request(struct wreplsrv_in_call *call)
NT_STATUS_HAVE_NO_MEMORY(names);
for (i=0; i < ret; i++) {
- rec = winsdb_record(res[i], call);
- NT_STATUS_HAVE_NO_MEMORY(rec);
-
- rec->name = winsdb_nbt_name(names, res[i]->dn);
- if (!rec->name) {
- return NT_STATUS_INTERNAL_DB_CORRUPTION;
- }
+ status = winsdb_record(res[i], NULL, call, &rec);
+ NT_STATUS_NOT_OK_RETURN(status);
status = wreplsrv_record2wins_name(names, &names[i], rec);
NT_STATUS_NOT_OK_RETURN(status);
diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c
index 866090f400..dd49b37d78 100644
--- a/source4/wrepl_server/wrepl_server.c
+++ b/source4/wrepl_server/wrepl_server.c
@@ -205,13 +205,13 @@ static NTSTATUS wreplsrv_load_table(struct wreplsrv_service *service)
uint64_t version;
const char * const attrs[] = {
"winsOwner",
- "version",
+ "versionID",
NULL
};
/* find the record in the WINS database */
ret = ldb_search(service->wins_db, NULL, LDB_SCOPE_SUBTREE,
- "(objectClass=wins)", attrs, &res);
+ "(objectClass=winsRecord)", attrs, &res);
if (res != NULL) {
talloc_steal(tmp_ctx, res);
}
@@ -221,7 +221,7 @@ static NTSTATUS wreplsrv_load_table(struct wreplsrv_service *service)
for (i=0; i < ret; i++) {
wins_owner = ldb_msg_find_string(res[i], "winsOwner", NULL);
- version = ldb_msg_find_uint64(res[i], "version", 0);
+ version = ldb_msg_find_uint64(res[i], "versionID", 0);
if (wins_owner) {
status = wreplsrv_add_table(service,