changed find_free_file() to file_new().
authorAndrew Tridgell <tridge@samba.org>
Sun, 16 Aug 1998 02:32:55 +0000 (02:32 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 16 Aug 1998 02:32:55 +0000 (02:32 +0000)
source/smbd/files.c
source/smbd/nttrans.c
source/smbd/reply.c
source/smbd/trans2.c

index a37d190f01ca43b61fdf22f30fb0b945e8308ae8..04aff67a155b1d60547f5be74222689b748c4c03 100644 (file)
@@ -41,7 +41,7 @@ static int max_file_fd_used = 0;
 /****************************************************************************
   find first available file slot
 ****************************************************************************/
-files_struct *find_free_file(void )
+files_struct *file_new(void )
 {
        int i;
        static int first_file;
index d396b05a629cda302c0bf1e10a95510708ae8a69..0e76bf30b2a3ea30002ba3b0ed36fbebe413d8eb 100644 (file)
@@ -466,7 +466,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
                
                unix_convert(fname,conn,0,&bad_path);
                
-               fsp = find_free_file();
+               fsp = file_new();
                if (!fsp) {
                        restore_case_semantics(file_attributes);
                        return(ERROR(ERRSRV,ERRnofids));
@@ -743,7 +743,7 @@ static int call_nt_transact_create(connection_struct *conn,
 
     unix_convert(fname,conn,0,&bad_path);
     
-    fsp = find_free_file();
+    fsp = file_new();
     if (!fsp) {
            restore_case_semantics(file_attributes);
            return(ERROR(ERRSRV,ERRnofids));
index e9a25ea79ac53d8675c4c4da2cec73c7c1aff1ef..340602d3a5c121026e3c5265044a40564ab363bd 100644 (file)
@@ -1243,7 +1243,7 @@ int reply_open(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
   pstrcpy(fname,smb_buf(inbuf)+1);
   unix_convert(fname,conn,0,&bad_path);
     
-  fsp = find_free_file();
+  fsp = file_new();
   if (!fsp)
     return(ERROR(ERRSRV,ERRnofids));
 
@@ -1344,7 +1344,7 @@ int reply_open_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
   pstrcpy(fname,smb_buf(inbuf));
   unix_convert(fname,conn,0,&bad_path);
     
-  fsp = find_free_file();
+  fsp = file_new();
   if (!fsp)
     return(ERROR(ERRSRV,ERRnofids));
 
@@ -1487,7 +1487,7 @@ int reply_mknew(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
   
   unixmode = unix_mode(conn,createmode);
   
-  fsp = find_free_file();
+  fsp = file_new();
   if (!fsp)
     return(ERROR(ERRSRV,ERRnofids));
 
@@ -1567,7 +1567,7 @@ int reply_ctemp(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
   
   unixmode = unix_mode(conn,createmode);
   
-  fsp = find_free_file();
+  fsp = file_new();
   if (fsp)
     return(ERROR(ERRSRV,ERRnofids));
 
@@ -2588,7 +2588,7 @@ int reply_printopen(connection_struct *conn,
                slprintf(fname,sizeof(fname)-1, "%s.XXXXXX",s);  
        }
 
-       fsp = find_free_file();
+       fsp = file_new();
        if (!fsp)
                return(ERROR(ERRSRV,ERRnofids));
        
@@ -3273,7 +3273,7 @@ static BOOL copy_file(char *src,char *dest1,connection_struct *conn, int ofun,
 
   if (!file_exist(src,&st)) return(False);
 
-  fsp1 = find_free_file();
+  fsp1 = file_new();
   if (!fsp1) return(False);
   open_file_shared(fsp1,conn,src,(DENY_NONE<<4),
                   1,0,0,&Access,&action);
@@ -3286,7 +3286,7 @@ static BOOL copy_file(char *src,char *dest1,connection_struct *conn, int ofun,
   if (!target_is_directory && count)
     ofun = 1;
 
-  fsp2 = find_free_file();
+  fsp2 = file_new();
   if (!fsp2) {
          close_file(fsp1,False);
          return(False);
index 67db3aeb2a5cd0653b7b3e813420e01100293343..72ad7ec12b39255dbd5b168f03bc5a1bbc8cc0a1 100644 (file)
@@ -217,7 +217,7 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf,
 
   unix_convert(fname,conn,0,&bad_path);
     
-  fsp = find_free_file();
+  fsp = file_new();
   if (!fsp)
     return(ERROR(ERRSRV,ERRnofids));