summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-11-29 15:15:33 +0100
committerVolker Lendecke <vl@sernet.de>2007-12-05 13:45:11 +0100
commit80287d65d0ac9f88b01f8dbc926cd71ea49df29f (patch)
tree1f62c38a932e888d0b06a943c360ac9ba24982aa /source3
parent113cb765aad93e00ba495f50c50ccf425be44cd9 (diff)
downloadsamba-80287d65d0ac9f88b01f8dbc926cd71ea49df29f.tar.gz
samba-80287d65d0ac9f88b01f8dbc926cd71ea49df29f.tar.bz2
samba-80287d65d0ac9f88b01f8dbc926cd71ea49df29f.zip
tiny refactoring
(This used to be commit 7f15a9f5a281052d2bed13a622b2fc9a24c62096)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/nttrans.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 9ff1cac140..d5abb372cf 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1289,6 +1289,7 @@ static void call_nt_transact_create(connection_struct *conn,
NTSTATUS status;
size_t param_len;
struct case_semantics_state *case_state = NULL;
+ SMB_BIG_UINT allocation_size;
TALLOC_CTX *ctx = talloc_tos();
DEBUG(5,("call_nt_transact_create\n"));
@@ -1330,6 +1331,10 @@ static void call_nt_transact_create(connection_struct *conn,
sd_len = IVAL(params,36);
ea_len = IVAL(params,40);
root_dir_fid = (uint16)IVAL(params,4);
+ allocation_size = (SMB_BIG_UINT)IVAL(params,12);
+#ifdef LARGE_SMB_OFF_T
+ allocation_size |= (((SMB_BIG_UINT)IVAL(params,16)) << 32);
+#endif
/* Ensure the data_len is correct for the sd and ea values given. */
if ((ea_len + sd_len > data_count) ||
@@ -1700,10 +1705,6 @@ static void call_nt_transact_create(connection_struct *conn,
/* Save the requested allocation size. */
if ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN)) {
- SMB_BIG_UINT allocation_size = (SMB_BIG_UINT)IVAL(params,12);
-#ifdef LARGE_SMB_OFF_T
- allocation_size |= (((SMB_BIG_UINT)IVAL(params,16)) << 32);
-#endif
if (allocation_size && (allocation_size > file_len)) {
fsp->initial_allocation_size = smb_roundup(fsp->conn, allocation_size);
if (fsp->is_directory) {