220.127.116.11 Processing RopLockRegionStream
When the server receives a RopLockRegionStream ROP request buffer ([MS-OXCROPS] section 18.104.22.168) from the client, the server parses the buffer. The server responds with a RopLockRegionStream ROP response buffer. For details about how the server parses buffers and processes ROPs, see [MS-OXCROPS] section 22.214.171.124. For details about how the server formats buffers for the response, see [MS-OXCROPS] section 126.96.36.199.
Servers MAY<15> implement this ROP as follows:
If the server implements this ROP, the server MUST check for any existing locks on the requested region of the Stream object. If any are found, the server MUST check the last activity time on the session that locked the region previously. If the last activity time was greater than 30 seconds prior to the new request, the server MUST mark the previous lock as expired and discard any pending changes of the Stream object from the session that owned that lock. If all previous locks are expired, or if there are no previous locks, the server MUST grant the requesting client a new lock. If there are previous locks that are not expired, the server MUST return the AccessDenied error code (0x80070005) in the ReturnValue field of the ROP response buffer.
If a session with an expired lock calls any ROP for the Stream object that would encounter the locked region, the server MUST return the NetworkError error code (0x80040115) in the ReturnValue field of the ROP response buffer. The server MUST limit access to the locked region by other sessions as indicated by the LockFlags field of the ROP request buffer.