summaryrefslogtreecommitdiff
path: root/source4/nbt_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-01-08 20:57:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:49:54 -0500
commitd93e1b018e4e0b65562b472f6663e52c1532f593 (patch)
tree3ac09e6bb97bdfce1709c9f55f84357dd2e34533 /source4/nbt_server
parent042fcee4cd4bc940d36aeb66a2727f90e268c27e (diff)
downloadsamba-d93e1b018e4e0b65562b472f6663e52c1532f593.tar.gz
samba-d93e1b018e4e0b65562b472f6663e52c1532f593.tar.bz2
samba-d93e1b018e4e0b65562b472f6663e52c1532f593.zip
r12779: allow static tomstones
metze (This used to be commit 966872646e5ac38ed5b3eb41cf339ec8f1583f17)
Diffstat (limited to 'source4/nbt_server')
-rw-r--r--source4/nbt_server/wins/winsdb.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index 72dbd77959..0608575db2 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -562,12 +562,7 @@ NTSTATUS winsdb_record(struct winsdb_handle *h, struct ldb_message *msg, TALLOC_
}
rec->addresses[i] = NULL;
- if (rec->is_static) {
- if (num_values < 1) {
- status = NT_STATUS_INTERNAL_DB_CORRUPTION;
- goto failed;
- }
- rec->state = WREPL_STATE_ACTIVE;
+ if (rec->is_static && rec->state == WREPL_STATE_ACTIVE) {
rec->expire_time = get_time_t_max();
for (i=0;rec->addresses[i];i++) {
rec->addresses[i]->expire_time = rec->expire_time;
@@ -594,10 +589,9 @@ struct ldb_message *winsdb_message(struct ldb_context *ldb,
size_t addr_count;
const char *expire_time;
struct ldb_message *msg = ldb_msg_new(mem_ctx);
- if (msg == NULL) goto failed;
+ if (msg == NULL) goto failed;
- if (rec->is_static) {
- rec->state = WREPL_STATE_ACTIVE;
+ if (rec->is_static && rec->state == WREPL_STATE_ACTIVE) {
rec->expire_time = get_time_t_max();
for (i=0;rec->addresses[i];i++) {
rec->addresses[i]->expire_time = rec->expire_time;