mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
s3: nmbd: Don't set work_changed = True inside update_server_ttl().
This is taken care of inside expire_servers() when it calls remove_server_from_workgroup(). Ensure the only functions in nmbd_serverlistdb.c that set subnet->work_changed are: remove_all_servers() add_server_to_workgroup() remove_server_from_workgroup() Fix inspired by a change from Volker. https://bugzilla.samba.org/show_bug.cgi?id=11254 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
db6572ef80
commit
c3c820a661
@ -133,8 +133,6 @@ workgroup %s. This is a bug.\n", name, work->work_group));
|
|||||||
DEBUG(3,("create_server_on_workgroup: Created server entry %s of type %x (%s) on \
|
DEBUG(3,("create_server_on_workgroup: Created server entry %s of type %x (%s) on \
|
||||||
workgroup %s.\n", name,servertype,comment, work->work_group));
|
workgroup %s.\n", name,servertype,comment, work->work_group));
|
||||||
|
|
||||||
work->subnet->work_changed = True;
|
|
||||||
|
|
||||||
return(servrec);
|
return(servrec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,8 +149,6 @@ void update_server_ttl(struct server_record *servrec, int ttl)
|
|||||||
servrec->death_time = PERMANENT_TTL;
|
servrec->death_time = PERMANENT_TTL;
|
||||||
else
|
else
|
||||||
servrec->death_time = (ttl != PERMANENT_TTL) ? time(NULL)+(ttl*3) : PERMANENT_TTL;
|
servrec->death_time = (ttl != PERMANENT_TTL) ? time(NULL)+(ttl*3) : PERMANENT_TTL;
|
||||||
|
|
||||||
servrec->subnet->work_changed = True;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
@ -172,7 +168,6 @@ void expire_servers(struct work_record *work, time_t t)
|
|||||||
if ((servrec->death_time != PERMANENT_TTL) && ((t == -1) || (servrec->death_time < t))) {
|
if ((servrec->death_time != PERMANENT_TTL) && ((t == -1) || (servrec->death_time < t))) {
|
||||||
DEBUG(3,("expire_old_servers: Removing timed out server %s\n",servrec->serv.name));
|
DEBUG(3,("expire_old_servers: Removing timed out server %s\n",servrec->serv.name));
|
||||||
remove_server_from_workgroup(work, servrec);
|
remove_server_from_workgroup(work, servrec);
|
||||||
work->subnet->work_changed = True;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user