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 * 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, * the GNU Lesser Public License as published by the Free Software Foundation,
@ -17,7 +17,7 @@ namespace SMBLibrary.SMB1
public class TransactionCallNamedPipeRequest : TransactionSubcommand public class TransactionCallNamedPipeRequest : TransactionSubcommand
{ {
// Setup: // Setup:
public ushort FID; public ushort Priority;
// Data: // Data:
public byte[] WriteData; public byte[] WriteData;
@ -28,7 +28,7 @@ namespace SMBLibrary.SMB1
public TransactionCallNamedPipeRequest(byte[] setup, byte[] data) : base() public TransactionCallNamedPipeRequest(byte[] setup, byte[] data) : base()
{ {
FID = LittleEndianConverter.ToUInt16(setup, 2); Priority = LittleEndianConverter.ToUInt16(setup, 2);
WriteData = data; WriteData = data;
} }
@ -37,7 +37,7 @@ namespace SMBLibrary.SMB1
{ {
byte[] setup = new byte[4]; byte[] setup = new byte[4];
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName); LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
LittleEndianWriter.WriteUInt16(setup, 2, FID); LittleEndianWriter.WriteUInt16(setup, 2, Priority);
return base.GetSetup(); 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 * 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, * the GNU Lesser Public License as published by the Free Software Foundation,
@ -17,21 +17,22 @@ namespace SMBLibrary.SMB1
public class TransactionWaitNamedPipeRequest : TransactionSubcommand public class TransactionWaitNamedPipeRequest : TransactionSubcommand
{ {
// Setup: // Setup:
public ushort FID; public ushort Priority;
public TransactionWaitNamedPipeRequest() : base() public TransactionWaitNamedPipeRequest() : base()
{ {
} }
public TransactionWaitNamedPipeRequest(byte[] setup) : base() public TransactionWaitNamedPipeRequest(byte[] setup) : base()
{ {
FID = LittleEndianConverter.ToUInt16(setup, 2); Priority = LittleEndianConverter.ToUInt16(setup, 2);
} }
public override byte[] GetSetup() public override byte[] GetSetup()
{ {
byte[] setup = new byte[4]; byte[] setup = new byte[4];
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName); LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
LittleEndianWriter.WriteUInt16(setup, 2, FID); LittleEndianWriter.WriteUInt16(setup, 2, Priority);
return base.GetSetup(); return base.GetSetup();
} }