summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-27 13:38:07 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-27 13:38:07 +0000
commit464dc5433641566abeeabd07f46ab569c986a3b0 (patch)
treeadd1de1cdf35972ff9a89f6c107aa03ff8670326 /source3/smbd/server.c
parent8047228db4d3545da13d87d7b370a38ed0b4c4bb (diff)
downloadsamba-464dc5433641566abeeabd07f46ab569c986a3b0.tar.gz
samba-464dc5433641566abeeabd07f46ab569c986a3b0.tar.bz2
samba-464dc5433641566abeeabd07f46ab569c986a3b0.zip
also disable read prediction in 1.9.18
(This used to be commit 0f15558efb26b7215540a588dfe8733e9346d407)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 9b428df44c..88f7497ee5 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -48,7 +48,7 @@ extern BOOL case_preserve;
extern BOOL use_mangled_map;
extern BOOL short_case_preserve;
extern BOOL case_mangle;
-extern time_t smb_last_time;
+time_t smb_last_time=(time_t)0;
extern int smb_read_error;
@@ -1434,7 +1434,10 @@ void close_file(int fnum, BOOL normal_close)
uint32 inode = fs_p->fd_ptr->inode;
int token;
+#if USE_READ_PREDICTION
invalidate_read_prediction(fs_p->fd_ptr->fd);
+#endif
+
fs_p->open = False;
Connections[cnum].num_files_open--;
if(fs_p->wbmpx_ptr)
@@ -1972,6 +1975,7 @@ int read_file(int fnum,char *data,uint32 pos,int n)
{
int ret=0,readret;
+#if USE_READ_PREDICTION
if (!Files[fnum].can_write)
{
ret = read_predict(Files[fnum].fd_ptr->fd,pos,data,NULL,n);
@@ -1980,6 +1984,7 @@ int read_file(int fnum,char *data,uint32 pos,int n)
n -= ret;
pos += ret;
}
+#endif
#if USE_MMAP
if (Files[fnum].mmap_ptr)
@@ -4782,8 +4787,10 @@ static void process(void)
if (deadtime <= 0)
deadtime = DEFAULT_SMBD_TIMEOUT;
+#if USE_READ_PREDICTION
if (lp_readprediction())
do_read_prediction();
+#endif
errno = 0;