summaryrefslogtreecommitdiff
path: root/source3/libnet/libnet_samsync.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-02-01 16:01:57 -0800
committerJeremy Allison <jra@samba.org>2011-02-02 01:52:21 +0100
commit3d4a9ddc244bd4937af9ff1c6e898ab45a7d28b5 (patch)
tree2f6c0c79561f9fb6967cd4ac93e92533acc84fca /source3/libnet/libnet_samsync.c
parenta19c1cbb8d74307e05cba379903c739e7abc0943 (diff)
downloadsamba-3d4a9ddc244bd4937af9ff1c6e898ab45a7d28b5.tar.gz
samba-3d4a9ddc244bd4937af9ff1c6e898ab45a7d28b5.tar.bz2
samba-3d4a9ddc244bd4937af9ff1c6e898ab45a7d28b5.zip
Based on a conversation with Volker, refactor some of the oplock code to make it comprehensible.
delay_for_oplocks() did 4 things. 1). Validation of existing oplock types. 2). Check for compatibility with batch oplocks (pass 1). 3). Check for compatibility with exclusive oplocks (pass 2). 4). Set the correct oplock type from the requested value. Refactor into 4 separate functions: 1). find_oplock_types() - does validation of oplock types and returns pointers to specific values. 2). delay_for_batch_oplocks() - the pass 1 phase above. 3). delay_for_exclusive_oplocks() - the pass 2 phase above 4). grant_fsp_oplock_type() - Set the correct oplock type from the requested value. Now separated out this code should be much easier to understand and modify. This also fixes an erroneous SMB_ASSERT which was hidden by the previous complexity of the single delay_for_oplocks() code. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 2 01:52:21 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/libnet/libnet_samsync.c')
0 files changed, 0 insertions, 0 deletions