summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-01-11 23:59:11 +0000
committerAndrew Tridgell <tridge@samba.org>1998-01-11 23:59:11 +0000
commit385e40c5dc079e04ef89fb7c158a01c1d1a77c58 (patch)
tree5db1a77eecbf690ae3ab0a829cccef860952b709 /source3/smbd
parentb13a8bdb40facf632c98f2087e48837c775be400 (diff)
downloadsamba-385e40c5dc079e04ef89fb7c158a01c1d1a77c58.tar.gz
samba-385e40c5dc079e04ef89fb7c158a01c1d1a77c58.tar.bz2
samba-385e40c5dc079e04ef89fb7c158a01c1d1a77c58.zip
*** empty log message ***
(This used to be commit 440535a0c755cfb55ced8fe537e2251d6a30714f)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index fb03577435..a83e865f9e 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -3671,9 +3671,13 @@ int find_free_file(void )
if (first_file == 0) first_file = 1;
}
+ if (first_file == MAX_OPEN_FILES)
+ first_file = 0;
+
for (i=first_file;i<MAX_OPEN_FILES;i++)
if (!Files[i].open) {
memset(&Files[i], 0, sizeof(Files[i]));
+ first_file++;
return(i);
}
@@ -3681,6 +3685,7 @@ int find_free_file(void )
for (i=1;i<first_file;i++)
if (!Files[i].open) {
memset(&Files[i], 0, sizeof(Files[i]));
+ first_file++;
return(i);
}