mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
smbd: move target code out of loop body
Reduces indentation of the code code that is run in this function and prepares for adding more of it. Review with: git show -w Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
7fc74c7883
commit
630f1228d1
@ -168,15 +168,21 @@ connection_struct *conn_new(struct smbd_server_connection *sconn)
|
||||
|
||||
static void conn_clear_vuid_cache(connection_struct *conn, uint64_t vuid)
|
||||
{
|
||||
struct vuid_cache_entry *ent = NULL;
|
||||
int i;
|
||||
|
||||
for (i=0; i<VUID_CACHE_SIZE; i++) {
|
||||
struct vuid_cache_entry *ent;
|
||||
|
||||
ent = &conn->vuid_cache->array[i];
|
||||
if (ent->vuid != vuid) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (i == VUID_CACHE_SIZE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ent->vuid == vuid) {
|
||||
ent->vuid = UID_FIELD_INVALID;
|
||||
|
||||
/*
|
||||
* We need to keep conn->session_info around
|
||||
* if it's equal to ent->session_info as a SMBulogoff
|
||||
@ -202,8 +208,6 @@ static void conn_clear_vuid_cache(connection_struct *conn, uint64_t vuid)
|
||||
}
|
||||
ent->read_only = False;
|
||||
ent->share_access = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user