svn commit: samba r19110 - in
branches/SAMBA_4_0_RELEASE/source/nbt_server/wins: .
abartlet at samba.org
abartlet at samba.org
Fri Oct 6 03:48:24 GMT 2006
Author: abartlet
Date: 2006-10-06 03:48:22 +0000 (Fri, 06 Oct 2006)
New Revision: 19110
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19110
Log:
Commit metze's wins server fix into the TP3 tree.
Andrew Bartlett
Modified:
branches/SAMBA_4_0_RELEASE/source/nbt_server/wins/winsdb.c
Changeset:
Modified: branches/SAMBA_4_0_RELEASE/source/nbt_server/wins/winsdb.c
===================================================================
--- branches/SAMBA_4_0_RELEASE/source/nbt_server/wins/winsdb.c 2006-10-06 03:40:45 UTC (rev 19109)
+++ branches/SAMBA_4_0_RELEASE/source/nbt_server/wins/winsdb.c 2006-10-06 03:48:22 UTC (rev 19110)
@@ -618,6 +618,7 @@
struct ldb_message_element *el;
struct nbt_name *name;
uint32_t i, j, num_values;
+ BOOL we_are_owner = False;
rec = talloc(mem_ctx, struct winsdb_record);
if (rec == NULL) {
@@ -678,10 +679,21 @@
goto failed;
}
- /* see if it has already expired */
+ if (strcmp(rec->wins_owner, h->local_owner) == 0) {
+ we_are_owner = True;
+ }
+
+ /*
+ * see if it has already expired
+ *
+ * NOTE: only expire owned records this way!
+ * w2k3 resolves expired replicas
+ * which are in active state
+ */
if (!rec->is_static &&
rec->expire_time <= now &&
- rec->state == WREPL_STATE_ACTIVE) {
+ rec->state == WREPL_STATE_ACTIVE &&
+ we_are_owner) {
DEBUG(5,("WINS: expiring name %s (expired at %s)\n",
nbt_name_string(mem_ctx, rec->name), timestring(mem_ctx, rec->expire_time)));
rec->state = WREPL_STATE_RELEASED;
@@ -703,7 +715,8 @@
*/
if (!rec->is_static &&
rec->addresses[j]->expire_time <= now &&
- rec->state == WREPL_STATE_ACTIVE) {
+ rec->state == WREPL_STATE_ACTIVE &&
+ we_are_owner) {
DEBUG(5,("WINS: expiring name addr %s of %s (expired at %s)\n",
rec->addresses[j]->address, nbt_name_string(rec->addresses[j], rec->name),
timestring(rec->addresses[j], rec->addresses[j]->expire_time)));
More information about the samba-cvs
mailing list