summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-14 13:01:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:02 -0500
commitb92064fcfd804b861e2f5125078812d83b9120a6 (patch)
tree8dc649a6c38732da79d025922bdebad24f8c978c /source3/smbd
parentcb47bb6d8f987febfc7b70b2de2d8d32b2ce8229 (diff)
downloadsamba-b92064fcfd804b861e2f5125078812d83b9120a6.tar.gz
samba-b92064fcfd804b861e2f5125078812d83b9120a6.tar.bz2
samba-b92064fcfd804b861e2f5125078812d83b9120a6.zip
r22846: Chunk one to replace message_send_pid with messaging_send: Deep inside
locking/locking.c we have to send retry messages to timed lock holders. The majority of this patch passes a "struct messaging_context" down there. No functional change, survives make test. (This used to be commit bbb508414683eeddd2ee0d2d36fe620118180bbb)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/blocking.c11
-rw-r--r--source3/smbd/close.c2
-rw-r--r--source3/smbd/reply.c24
-rw-r--r--source3/smbd/trans2.c6
4 files changed, 28 insertions, 15 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index 7fe9f0c3c7..ab2b0949bd 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -195,7 +195,7 @@ BOOL push_blocking_lock_request( struct byte_range_lock *br_lck,
blr->length = length;
/* Add a pending lock record for this. */
- status = brl_lock(br_lck,
+ status = brl_lock(smbd_messaging_context(), br_lck,
lock_pid,
procid_self(),
offset,
@@ -355,7 +355,8 @@ static void reply_lockingX_error(blocking_lock_record *blr, NTSTATUS status)
* request would never have been queued. JRA.
*/
- do_unlock(fsp,
+ do_unlock(smbd_messaging_context(),
+ fsp,
lock_pid,
count,
offset,
@@ -435,7 +436,8 @@ static BOOL process_lockingX(blocking_lock_record *blr)
* request would never have been queued. JRA.
*/
errno = 0;
- br_lck = do_lock(fsp,
+ br_lck = do_lock(smbd_messaging_context(),
+ fsp,
lock_pid,
count,
offset,
@@ -496,7 +498,8 @@ static BOOL process_trans2(blocking_lock_record *blr)
char *outbuf;
char params[2];
NTSTATUS status;
- struct byte_range_lock *br_lck = do_lock(blr->fsp,
+ struct byte_range_lock *br_lck = do_lock(smbd_messaging_context(),
+ blr->fsp,
blr->lock_pid,
blr->count,
blr->offset,
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 2eb3a3e13c..ca4e501a14 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -352,7 +352,7 @@ static NTSTATUS close_normal_file(files_struct *fsp, enum file_close_type close_
release_file_oplock(fsp);
}
- locking_close_file(fsp);
+ locking_close_file(smbd_messaging_context(), fsp);
status = fd_close(conn, fsp);
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 8748c1cd23..5353e392b1 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2415,7 +2415,8 @@ int reply_lockread(connection_struct *conn, char *inbuf,char *outbuf, int length
* Note that the requested lock size is unaffected by max_recv.
*/
- br_lck = do_lock(fsp,
+ br_lck = do_lock(smbd_messaging_context(),
+ fsp,
(uint32)SVAL(inbuf,smb_pid),
(SMB_BIG_UINT)numtoread,
(SMB_BIG_UINT)startpos,
@@ -2917,7 +2918,8 @@ int reply_writeunlock(connection_struct *conn, char *inbuf,char *outbuf,
}
if (numtowrite) {
- status = do_unlock(fsp,
+ status = do_unlock(smbd_messaging_context(),
+ fsp,
(uint32)SVAL(inbuf,smb_pid),
(SMB_BIG_UINT)numtowrite,
(SMB_BIG_UINT)startpos,
@@ -3420,7 +3422,8 @@ int reply_lock(connection_struct *conn,
DEBUG(3,("lock fd=%d fnum=%d offset=%.0f count=%.0f\n",
fsp->fh->fd, fsp->fnum, (double)offset, (double)count));
- br_lck = do_lock(fsp,
+ br_lck = do_lock(smbd_messaging_context(),
+ fsp,
(uint32)SVAL(inbuf,smb_pid),
count,
offset,
@@ -3458,7 +3461,8 @@ int reply_unlock(connection_struct *conn, char *inbuf,char *outbuf, int size,
count = (SMB_BIG_UINT)IVAL(inbuf,smb_vwv1);
offset = (SMB_BIG_UINT)IVAL(inbuf,smb_vwv3);
- status = do_unlock(fsp,
+ status = do_unlock(smbd_messaging_context(),
+ fsp,
(uint32)SVAL(inbuf,smb_pid),
count,
offset,
@@ -4144,7 +4148,8 @@ static void rename_open_files(connection_struct *conn, struct share_mode_lock *l
}
/* Send messages to all smbd's (not ourself) that the name has changed. */
- rename_share_filename(lck, conn->connectpath, newname);
+ rename_share_filename(smbd_messaging_context(), lck, conn->connectpath,
+ newname);
}
/****************************************************************************
@@ -5453,7 +5458,8 @@ int reply_lockingX(connection_struct *conn, char *inbuf, char *outbuf,
"pid %u, file %s\n", (double)offset, (double)count,
(unsigned int)lock_pid, fsp->fsp_name ));
- status = do_unlock(fsp,
+ status = do_unlock(smbd_messaging_context(),
+ fsp,
lock_pid,
count,
offset,
@@ -5526,7 +5532,8 @@ int reply_lockingX(connection_struct *conn, char *inbuf, char *outbuf,
BOOL defer_lock = False;
struct byte_range_lock *br_lck;
- br_lck = do_lock(fsp,
+ br_lck = do_lock(smbd_messaging_context(),
+ fsp,
lock_pid,
count,
offset,
@@ -5612,7 +5619,8 @@ int reply_lockingX(connection_struct *conn, char *inbuf, char *outbuf,
return ERROR_DOS(ERRDOS,ERRnoaccess);
}
- do_unlock(fsp,
+ do_unlock(smbd_messaging_context(),
+ fsp,
lock_pid,
count,
offset,
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 91218fe9f4..1c55684330 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4805,13 +4805,15 @@ static NTSTATUS smb_set_posix_lock(connection_struct *conn,
(double)offset ));
if (lock_type == UNLOCK_LOCK) {
- status = do_unlock(fsp,
+ status = do_unlock(smbd_messaging_context(),
+ fsp,
lock_pid,
count,
offset,
POSIX_LOCK);
} else {
- struct byte_range_lock *br_lck = do_lock(fsp,
+ struct byte_range_lock *br_lck = do_lock(smbd_messaging_context(),
+ fsp,
lock_pid,
count,
offset,