No change in behaviour.
After calling set_domain_offline() domain->offline will be set to false, iow
everytime
if (!domain->internal && was_online)
is true,
if (!domain->internal &&
!domain->online &&
was_online)
will also true, so we can drop the second if expression.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
NT_STATUS_EQUAL(status, NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND))
{
if (!domain->internal && was_online) {
+ /* Set the domain offline and query the cache again */
set_domain_offline(domain);
- }
- if (!domain->internal &&
- !domain->online &&
- was_online) {
- NTSTATUS cache_status;
- cache_status = wcache_name_to_sid(domain, domain_name, name, sid, type);
- return cache_status;
+ return wcache_name_to_sid(domain,
+ domain_name,
+ name,
+ sid,
+ type);
}
}
/* and save it */