summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-06-12 11:06:24 +0200
committerVolker Lendecke <vl@samba.org>2010-06-12 11:59:21 +0200
commit46a48edcdfc043a400310e6b1b84d0469c5623e1 (patch)
tree2561b0f3e02dba4ae61f9ce245d468916c221841
parentd7bc5fe7346e4f6c3f04be96618046879666a127 (diff)
downloadsamba-46a48edcdfc043a400310e6b1b84d0469c5623e1.tar.gz
samba-46a48edcdfc043a400310e6b1b84d0469c5623e1.tar.bz2
samba-46a48edcdfc043a400310e6b1b84d0469c5623e1.zip
s3: Use "sconn" argument in smbd_[un]lock_socket_internal
Metze, please check!
-rw-r--r--source3/smbd/process.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 443914de70..6b48d96ffa 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -46,19 +46,19 @@ static bool smbd_lock_socket_internal(struct smbd_server_connection *sconn)
{
bool ok;
- if (smbd_server_conn->smb1.echo_handler.socket_lock_fd == -1) {
+ if (sconn->smb1.echo_handler.socket_lock_fd == -1) {
return true;
}
- smbd_server_conn->smb1.echo_handler.ref_count++;
+ sconn->smb1.echo_handler.ref_count++;
- if (smbd_server_conn->smb1.echo_handler.ref_count > 1) {
+ if (sconn->smb1.echo_handler.ref_count > 1) {
return true;
}
DEBUG(10,("pid[%d] wait for socket lock\n", (int)sys_getpid()));
- ok = fcntl_lock(smbd_server_conn->smb1.echo_handler.socket_lock_fd,
+ ok = fcntl_lock(sconn->smb1.echo_handler.socket_lock_fd,
SMB_F_SETLKW, 0, 0, F_WRLCK);
if (!ok) {
return false;
@@ -80,17 +80,17 @@ static bool smbd_unlock_socket_internal(struct smbd_server_connection *sconn)
{
bool ok;
- if (smbd_server_conn->smb1.echo_handler.socket_lock_fd == -1) {
+ if (sconn->smb1.echo_handler.socket_lock_fd == -1) {
return true;
}
- smbd_server_conn->smb1.echo_handler.ref_count--;
+ sconn->smb1.echo_handler.ref_count--;
- if (smbd_server_conn->smb1.echo_handler.ref_count > 0) {
+ if (sconn->smb1.echo_handler.ref_count > 0) {
return true;
}
- ok = fcntl_lock(smbd_server_conn->smb1.echo_handler.socket_lock_fd,
+ ok = fcntl_lock(sconn->smb1.echo_handler.socket_lock_fd,
SMB_F_SETLKW, 0, 0, F_UNLCK);
if (!ok) {
return false;