int lock_num;
SMB_BIG_UINT offset;
SMB_BIG_UINT count;
- uint16 lock_pid;
+ uint32 lock_pid;
enum brl_flavour lock_flav;
enum brl_type lock_type;
char *inbuf;
files_struct *fsp,
int lock_timeout,
int lock_num,
- uint16 lock_pid,
+ uint32 lock_pid,
enum brl_type lock_type,
enum brl_flavour lock_flav,
SMB_BIG_UINT offset, SMB_BIG_UINT count)
memcpy(blr->inbuf, inbuf, length);
blr->length = length;
- br_lck = brl_get_locks(blr->fsp);
+ br_lck = brl_get_locks(NULL, blr->fsp);
if (!br_lck) {
free_blocking_lock_record(blr);
return False;
PENDING_LOCK,
blr->lock_flav,
&my_lock_ctx);
- byte_range_lock_destructor(br_lck);
+ TALLOC_FREE(br_lck);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("push_blocking_lock_request: failed to add PENDING_LOCK record.\n"));
files_struct *fsp = blr->fsp;
uint16 num_ulocks = SVAL(inbuf,smb_vwv6);
SMB_BIG_UINT count = (SMB_BIG_UINT)0, offset = (SMB_BIG_UINT) 0;
- uint16 lock_pid;
+ uint32 lock_pid;
unsigned char locktype = CVAL(inbuf,smb_vwv3);
BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
char *data;
data = smb_buf(outbuf) + 3;
status = do_lock_spin(fsp,
- SVAL(inbuf,smb_pid),
+ (uint32)SVAL(inbuf,smb_pid),
(SMB_BIG_UINT)numtoread,
startpos,
READ_LOCK,
errno = 0;
status = do_lock_spin(fsp,
- SVAL(inbuf,smb_pid),
+ (uint32)SVAL(inbuf,smb_pid),
count,
offset,
WRITE_LOCK,
uint16 num_ulocks = SVAL(inbuf,smb_vwv6);
uint16 num_locks = SVAL(inbuf,smb_vwv7);
SMB_BIG_UINT count = (SMB_BIG_UINT)0, offset = (SMB_BIG_UINT)0;
- uint16 lock_pid;
+ uint32 lock_pid;
BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
char *data;
BOOL my_lock_ctx = False;
for(blr = blocking_lock_queue; blr; blr = next) {
next = blr->next;
if(blr->fsp->fnum == fsp->fnum) {
- struct byte_range_lock *br_lck = brl_get_locks(fsp);
+ struct byte_range_lock *br_lck = brl_get_locks(NULL, fsp);
if (br_lck) {
DEBUG(10,("remove_pending_lock_requests_by_fid - removing request type %d for \
blr->offset,
blr->count,
blr->lock_flav);
- byte_range_lock_destructor(br_lck);
+ TALLOC_FREE(br_lck);
}
next = blr->next;
if(SVAL(blr->inbuf,smb_mid) == mid) {
files_struct *fsp = blr->fsp;
- struct byte_range_lock *br_lck = brl_get_locks(fsp);
+ struct byte_range_lock *br_lck = brl_get_locks(NULL, fsp);
if (br_lck) {
DEBUG(10,("remove_pending_lock_requests_by_mid - removing request type %d for \
blr->offset,
blr->count,
blr->lock_flav);
- byte_range_lock_destructor(br_lck);
+ TALLOC_FREE(br_lck);
}
blocking_lock_reply_error(blr,NT_STATUS_FILE_LOCK_CONFLICT);
fsp->fnum, fsp->fsp_name ));
if((blr->expire_time != -1) && (blr->expire_time <= t)) {
- struct byte_range_lock *br_lck = brl_get_locks(fsp);
+ struct byte_range_lock *br_lck = brl_get_locks(NULL, fsp);
/*
* Lock expired - throw away all previously
blr->offset,
blr->count,
blr->lock_flav);
- byte_range_lock_destructor(br_lck);
+ TALLOC_FREE(br_lck);
}
blocking_lock_reply_error(blr,NT_STATUS_FILE_LOCK_CONFLICT);
}
if(!change_to_user(conn,vuid)) {
- struct byte_range_lock *br_lck = brl_get_locks(fsp);
+ struct byte_range_lock *br_lck = brl_get_locks(NULL, fsp);
/*
* Remove the entry and return an error to the client.
blr->offset,
blr->count,
blr->lock_flav);
- byte_range_lock_destructor(br_lck);
+ TALLOC_FREE(br_lck);
}
DEBUG(0,("process_blocking_lock_queue: Unable to become user vuid=%d.\n",
}
if(!set_current_service(conn,SVAL(blr->inbuf,smb_flg),True)) {
- struct byte_range_lock *br_lck = brl_get_locks(fsp);
+ struct byte_range_lock *br_lck = brl_get_locks(NULL, fsp);
/*
* Remove the entry and return an error to the client.
blr->offset,
blr->count,
blr->lock_flav);
- byte_range_lock_destructor(br_lck);
+ TALLOC_FREE(br_lck);
}
DEBUG(0,("process_blocking_lock_queue: Unable to become service Error was %s.\n", strerror(errno) ));
*/
if(blocking_lock_record_process(blr)) {
- struct byte_range_lock *br_lck = brl_get_locks(fsp);
+ struct byte_range_lock *br_lck = brl_get_locks(NULL, fsp);
if (br_lck) {
brl_remove_pending_lock(br_lck,
blr->offset,
blr->count,
blr->lock_flav);
- byte_range_lock_destructor(br_lck);
+ TALLOC_FREE(br_lck);
}
free_blocking_lock_record(blr);