[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
[samba.git] / source / smbd / files.c
index 07dec80a47af02630e566fc239c0df2e9711b2fa..179963dae9b5250995608386b2dc5b17cb98362f 100644 (file)
@@ -233,7 +233,7 @@ void file_dump_open_table(void)
        for (fsp=Files;fsp;fsp=fsp->next,count++) {
                DEBUG(10,("Files[%d], fnum = %d, name %s, fd = %d, gen = %lu, fileid=%s\n",
                        count, fsp->fnum, fsp->fsp_name, fsp->fh->fd, (unsigned long)fsp->fh->gen_id,
-                         file_id_static_string(&fsp->file_id)));
+                         file_id_string_tos(&fsp->file_id)));
        }
 }
 
@@ -280,7 +280,7 @@ files_struct *file_find_dif(struct file_id id, unsigned long gen_id)
                            (fsp->oplock_type != FAKE_LEVEL_II_OPLOCK)) {
                                DEBUG(0,("file_find_dif: file %s file_id = %s, gen = %u \
 oplock_type = %u is a stat open with oplock type !\n", fsp->fsp_name, 
-                                        file_id_static_string(&fsp->file_id),
+                                        file_id_string_tos(&fsp->file_id),
                                         (unsigned int)fsp->fh->gen_id,
                                         (unsigned int)fsp->oplock_type ));
                                smb_panic("file_find_dif");
@@ -487,7 +487,7 @@ files_struct *file_fnum(uint16 fnum)
  Get an fsp from a packet given the offset of a 16 bit fnum.
 ****************************************************************************/
 
-files_struct *file_fsp(const char *buf, int where)
+files_struct *file_fsp(uint16 fid)
 {
        files_struct *fsp;
 
@@ -495,11 +495,7 @@ files_struct *file_fsp(const char *buf, int where)
                return chain_fsp;
        }
 
-       if (!buf) {
-               return NULL;
-       }
-
-       fsp = file_fnum(SVAL(buf, where));
+       fsp = file_fnum(fid);
        if (fsp) {
                chain_fsp = fsp;
        }
@@ -562,6 +558,7 @@ NTSTATUS dup_file_fsp(files_struct *fsp,
        dup_fsp->modified = fsp->modified;
        dup_fsp->is_directory = fsp->is_directory;
        dup_fsp->is_stat = fsp->is_stat;
+       dup_fsp->aio_write_behind = fsp->aio_write_behind;
         string_set(&dup_fsp->fsp_name,fsp->fsp_name);
 
        *result = dup_fsp;