mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 10:47:48 +02:00
SMB2: CreateResponse: Minor code refactoring
This commit is contained in:
parent
390961f250
commit
c150a1265f
1 changed files with 4 additions and 3 deletions
|
@ -15,6 +15,7 @@ namespace SMBLibrary.SMB2
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CreateResponse : SMB2Command
|
public class CreateResponse : SMB2Command
|
||||||
{
|
{
|
||||||
|
public const int FixedLength = 88;
|
||||||
public const int DeclaredSize = 89;
|
public const int DeclaredSize = 89;
|
||||||
|
|
||||||
private ushort StructureSize;
|
private ushort StructureSize;
|
||||||
|
@ -82,8 +83,8 @@ namespace SMBLibrary.SMB2
|
||||||
CreateContextsLength = (uint)CreateContext.GetCreateContextListLength(CreateContexts);
|
CreateContextsLength = (uint)CreateContext.GetCreateContextListLength(CreateContexts);
|
||||||
if (CreateContexts.Count > 0)
|
if (CreateContexts.Count > 0)
|
||||||
{
|
{
|
||||||
CreateContextsOffset = SMB2Header.Length + 88;
|
CreateContextsOffset = SMB2Header.Length + FixedLength;
|
||||||
CreateContext.WriteCreateContextList(buffer, 88, CreateContexts);
|
CreateContext.WriteCreateContextList(buffer, FixedLength, CreateContexts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +92,7 @@ namespace SMBLibrary.SMB2
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return 88 + CreateContext.GetCreateContextListLength(CreateContexts);
|
return FixedLength + CreateContext.GetCreateContextListLength(CreateContexts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue