mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s4-winsrepl: don't put in attributes with no elements
Empty attributes are no longer allowed by ldb. This also fixes the error checking in winsdb_message() This fixes the samba4.nbt.winsreplication test
This commit is contained in:
parent
3f80b06d9e
commit
7bcc0b2966
@ -794,11 +794,11 @@ static struct ldb_message *winsdb_message(struct ldb_context *ldb,
|
||||
for (i=0;rec->addresses[i];i++) {
|
||||
ret |= ldb_msg_add_winsdb_addr(msg, rec, "address", rec->addresses[i]);
|
||||
}
|
||||
ret |= ldb_msg_add_empty(msg, "registeredBy", 0, NULL);
|
||||
if (rec->registered_by) {
|
||||
ret |= ldb_msg_add_empty(msg, "registeredBy", 0, NULL);
|
||||
ret |= ldb_msg_add_string(msg, "registeredBy", rec->registered_by);
|
||||
if (ret != 0) goto failed;
|
||||
}
|
||||
if (ret != 0) goto failed;
|
||||
return msg;
|
||||
|
||||
failed:
|
||||
|
Loading…
Reference in New Issue
Block a user