summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-10-06 17:52:25 +0000
committerJeremy Allison <jra@samba.org>1997-10-06 17:52:25 +0000
commit2e92be3aaf01c574d32d1a10e1359888638b68bc (patch)
tree5280182dda3e36282bd11699e022e015ad531bdc /source3/smbd
parent8429cec72ff15efdd5ab742ba71ede36db43ef14 (diff)
downloadsamba-2e92be3aaf01c574d32d1a10e1359888638b68bc.tar.gz
samba-2e92be3aaf01c574d32d1a10e1359888638b68bc.tar.bz2
samba-2e92be3aaf01c574d32d1a10e1359888638b68bc.zip
client.c: Changed shadowed variable.
locking.c: Removed USE_OPLOCKS - now the default. params.c: Removed unused variable. proto.h: Updated. reply.c: Removed USE_OPLOCKS - now the default. server.c: Removed USE_OPLOCKS - now the default. smb.h: Removed USE_OPLOCKS - now the default. smbparse.c: Changed shadowed variable. status.c: Removed USE_OPLOCKS - now the default. util.c: Removed USE_OPLOCKS - now the default. Jeremy (jallison@whistle.com) (This used to be commit b93509846d6291771787af457500eec8984ee6bd)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c6
-rw-r--r--source3/smbd/server.c26
2 files changed, 1 insertions, 31 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index a8f674183c..fa641931eb 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1621,7 +1621,6 @@ int reply_readbraw(char *inbuf, char *outbuf)
int fd;
char *fname;
-#ifdef USE_OPLOCKS
/*
* Special check if an oplock break has been issued
* and the readraw request croses on the wire, we must
@@ -1635,7 +1634,6 @@ int reply_readbraw(char *inbuf, char *outbuf)
DEBUG(5,("readbraw - oplock break finished\n"));
return -1;
}
-#endif
cnum = SVAL(inbuf,smb_tid);
fnum = GETFNUM(inbuf,smb_vwv0);
@@ -3373,7 +3371,7 @@ int reply_lockingX(char *inbuf,char *outbuf,int length,int bufsize)
unsigned char locktype = CVAL(inbuf,smb_vwv3);
#if 0
unsigned char oplocklevel = CVAL(inbuf,smb_vwv3+1);
-#endif /* USE_OPLOCKS */
+#endif
uint16 num_ulocks = SVAL(inbuf,smb_vwv6);
uint16 num_locks = SVAL(inbuf,smb_vwv7);
uint32 count, offset;
@@ -3391,7 +3389,6 @@ int reply_lockingX(char *inbuf,char *outbuf,int length,int bufsize)
data = smb_buf(inbuf);
-#ifdef USE_OPLOCKS
/* Check if this is an oplock break on a file
we have granted an oplock on.
*/
@@ -3432,7 +3429,6 @@ dev = %x, inode = %x\n", fnum, dev, inode));
fsp->granted_oplock = False;
return -1;
}
-#endif /* USE_OPLOCKS */
/* Data now points at the beginning of the list
of smb_unlkrng structs */
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 826b17121f..4f5b01ba91 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -84,13 +84,11 @@ int chain_fnum = -1;
/* number of open connections */
static int num_connections_open = 0;
-#ifdef USE_OPLOCKS
/* Oplock ipc UDP socket. */
int oplock_sock = -1;
uint16 oplock_port = 0;
/* Current number of oplocks we have outstanding. */
int32 global_oplocks_open = 0;
-#endif /* USE_OPLOCKS */
BOOL global_oplock_break = False;
@@ -1487,7 +1485,6 @@ BOOL check_file_sharing(int cnum,char *fname)
{
min_share_mode_entry *share_entry = &old_shares[i];
-#ifdef USE_OPLOCKS
/*
* Break oplocks before checking share modes. See comment in
* open_file_shared for details.
@@ -1513,7 +1510,6 @@ dev = %x, inode = %x\n", old_shares[i].op_type, fname, dev, inode));
broke_oplock = True;
break;
}
-#endif /* USE_OPLOCKS */
/* someone else has a share lock on it, check to see
if we can too */
@@ -1729,7 +1725,6 @@ void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,
{
min_share_mode_entry *share_entry = &old_shares[i];
-#ifdef USE_OPLOCKS
/*
* By observation of NetBench, oplocks are broken *before* share
* modes are checked. This allows a file to be closed by the client
@@ -1759,7 +1754,6 @@ dev = %x, inode = %x\n", old_shares[i].op_type, fname, dev, inode));
broke_oplock = True;
break;
}
-#endif /* USE_OPLOCKS */
/* someone else has a share lock on it, check to see
if we can too */
@@ -1841,7 +1835,6 @@ dev = %x, inode = %x\n", old_shares[i].op_type, fname, dev, inode));
if (lp_share_modes(SNUM(cnum)))
{
uint16 port = 0;
-#ifdef USE_OPLOCKS
/* JRA. Currently this only services Exlcusive and batch
oplocks (no other opens on this file). This needs to
be extended to level II oplocks (multiple reader
@@ -1862,10 +1855,6 @@ dev = %x, inode = %x\n", oplock_request, fname, dev, inode));
port = 0;
oplock_request = 0;
}
-#else /* USE_OPLOCKS */
- oplock_request = 0;
- port = 0;
-#endif /* USE_OPLOCKS */
set_share_mode(token, fnum, port, oplock_request);
}
@@ -2434,7 +2423,6 @@ static void process_smb(char *inbuf, char *outbuf)
trans_num++;
}
-#ifdef USE_OPLOCKS
/****************************************************************************
open the oplock IPC socket communication
****************************************************************************/
@@ -2882,8 +2870,6 @@ oplock break response from pid %d on port %d for dev = %x, inode = %x.\n",
return True;
}
-#endif /* USE_OPLOCKS */
-
/****************************************************************************
check if a snum is in use
****************************************************************************/
@@ -4588,9 +4574,7 @@ static void process(void)
int counter;
int last_keepalive=0;
int service_load_counter = 0;
-#ifdef USE_OPLOCKS
BOOL got_smb = False;
-#endif /* USE_OPLOCKS */
if (deadtime <= 0)
deadtime = DEFAULT_SMBD_TIMEOUT;
@@ -4601,12 +4585,8 @@ static void process(void)
errno = 0;
for (counter=SMBD_SELECT_LOOP;
-#ifdef USE_OPLOCKS
!receive_message_or_smb(Client,oplock_sock,
InBuffer,BUFFER_SIZE,SMBD_SELECT_LOOP*1000,&got_smb);
-#else /* USE_OPLOCKS */
- !receive_smb(Client,InBuffer,SMBD_SELECT_LOOP*1000);
-#endif /* USE_OPLOCKS */
counter += SMBD_SELECT_LOOP)
{
int i;
@@ -4689,14 +4669,10 @@ static void process(void)
}
}
-#ifdef USE_OPLOCKS
if(got_smb)
-#endif /* USE_OPLOCKS */
process_smb(InBuffer, OutBuffer);
-#ifdef USE_OPLOCKS
else
process_local_message(oplock_sock, InBuffer, BUFFER_SIZE);
-#endif /* USE_OPLOCKS */
}
}
@@ -4976,11 +4952,9 @@ static void usage(char *pname)
DEBUG(2,("%s changed root to %s\n",timestring(),lp_rootdir()));
}
-#ifdef USE_OPLOCKS
/* Setup the oplock IPC socket. */
if(!open_oplock_ipc())
exit(1);
-#endif /* USE_OPLOCKS */
process();
close_sockets();