summaryrefslogtreecommitdiff
path: root/source4/nbt_server/wins
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-16 11:41:52 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-16 11:56:40 +1100
commit7bcc0b29662663be75828f2618a5013e7c2c2817 (patch)
tree973114845a0aecb81d117741dfc3f496ba4c957f /source4/nbt_server/wins
parent3f80b06d9ed9d1aabb56168ccee90d7d945de8ed (diff)
downloadsamba-7bcc0b29662663be75828f2618a5013e7c2c2817.tar.gz
samba-7bcc0b29662663be75828f2618a5013e7c2c2817.tar.bz2
samba-7bcc0b29662663be75828f2618a5013e7c2c2817.zip
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
Diffstat (limited to 'source4/nbt_server/wins')
-rw-r--r--source4/nbt_server/wins/winsdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index 5c3efe2b83..389995e1bc 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -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: