Corrected TransactionCallNamedPipeRequest / TransactionWaitNamedPipeRequest parameter name

This commit is contained in:
Tal Aloni 2017-02-02 22:56:06 +02:00
parent b24345b5ca
commit d3a0a290c5
2 changed files with 9 additions and 8 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
*
* You can redistribute this program and/or modify it under the terms of
* the GNU Lesser Public License as published by the Free Software Foundation,
@ -17,7 +17,7 @@ namespace SMBLibrary.SMB1
public class TransactionCallNamedPipeRequest : TransactionSubcommand
{
// Setup:
public ushort FID;
public ushort Priority;
// Data:
public byte[] WriteData;
@ -28,7 +28,7 @@ namespace SMBLibrary.SMB1
public TransactionCallNamedPipeRequest(byte[] setup, byte[] data) : base()
{
FID = LittleEndianConverter.ToUInt16(setup, 2);
Priority = LittleEndianConverter.ToUInt16(setup, 2);
WriteData = data;
}
@ -37,7 +37,7 @@ namespace SMBLibrary.SMB1
{
byte[] setup = new byte[4];
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
LittleEndianWriter.WriteUInt16(setup, 2, FID);
LittleEndianWriter.WriteUInt16(setup, 2, Priority);
return base.GetSetup();
}

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
*
* You can redistribute this program and/or modify it under the terms of
* the GNU Lesser Public License as published by the Free Software Foundation,
@ -17,21 +17,22 @@ namespace SMBLibrary.SMB1
public class TransactionWaitNamedPipeRequest : TransactionSubcommand
{
// Setup:
public ushort FID;
public ushort Priority;
public TransactionWaitNamedPipeRequest() : base()
{
}
public TransactionWaitNamedPipeRequest(byte[] setup) : base()
{
FID = LittleEndianConverter.ToUInt16(setup, 2);
Priority = LittleEndianConverter.ToUInt16(setup, 2);
}
public override byte[] GetSetup()
{
byte[] setup = new byte[4];
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
LittleEndianWriter.WriteUInt16(setup, 2, FID);
LittleEndianWriter.WriteUInt16(setup, 2, Priority);
return base.GetSetup();
}