setup more things on reconnect (add to global file list)
authorMichael Adam <obnox@samba.org>
Thu, 23 Feb 2012 15:27:12 +0000 (16:27 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 May 2012 16:42:01 +0000 (18:42 +0200)
source3/smbd/smb2_create.c

index bdc057c5d269592c5de0c792f8fdf550abd32d93..c2384118c76371a9319abd684da57b238ed17dbe 100644 (file)
@@ -560,7 +560,8 @@ DEBUG(0, ("OBNOX - durable_reconnect: new fsp created (%s:%s)\n", __location__,
        fsp->is_directory = false;//from->is_directory;
        fsp->aio_write_behind = false;//from->aio_write_behind;
 
-       ok = set_file_oplock(fsp, e->op_type);
+       fsp->oplock_type = e->op_type;
+
 
        sharemode_lock->data->modified = true;
        e->pid = messaging_server_id(op->connection->sconn->msg_ctx);
@@ -581,6 +582,16 @@ DEBUG(0, ("OBNOX - durable_reconnect: failed to open file: %s (%s:%s)\n", nt_err
                return status;
        }
 
+       ok = set_file_oplock(fsp, e->op_type);
+
+       DLIST_ADD(conn->sconn->files, fsp);
+       conn->sconn->num_files += 1;
+
+       DEBUG(5,("allocated file structure, fnum = %d (%d used)\n",
+                fsp->fnum, (unsigned int)conn->sconn->num_files));
+
+       smb1req->chain_fsp = fsp;
+
 DEBUG(0, ("OBNOX - durable_reconnect: opened file (%s:%s)\n", __location__, __FUNCTION__));
 
        /* - release the sharemode lock: this writes the changes */