From 71eb9f143fa85fac8b76857c054217cab3aa9536 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 8 Jul 2017 03:25:24 -0400 Subject: update sharpcifs --- .../IO/SharpCifs/Netbios/SessionRequestPacket.cs | 71 +++++++++++----------- 1 file changed, 36 insertions(+), 35 deletions(-) (limited to 'Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs') diff --git a/Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs b/Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs index 0f4d7e5e2..a5243f7aa 100644 --- a/Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs +++ b/Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs @@ -19,44 +19,45 @@ using SharpCifs.Util.Sharpen; namespace SharpCifs.Netbios { - public class SessionRequestPacket : SessionServicePacket - { - private Name _calledName; + public class SessionRequestPacket : SessionServicePacket + { + private Name _calledName; - private Name _callingName; + private Name _callingName; - public SessionRequestPacket() - { - _calledName = new Name(); - _callingName = new Name(); - } + public SessionRequestPacket() + { + _calledName = new Name(); + _callingName = new Name(); + } - public SessionRequestPacket(Name calledName, Name callingName) - { - Type = SessionRequest; - this._calledName = calledName; - this._callingName = callingName; - } + public SessionRequestPacket(Name calledName, Name callingName) + { + Type = SessionRequest; + this._calledName = calledName; + this._callingName = callingName; + } - internal override int WriteTrailerWireFormat(byte[] dst, int dstIndex) - { - int start = dstIndex; - dstIndex += _calledName.WriteWireFormat(dst, dstIndex); - dstIndex += _callingName.WriteWireFormat(dst, dstIndex); - return dstIndex - start; - } + internal override int WriteTrailerWireFormat(byte[] dst, int dstIndex) + { + int start = dstIndex; + dstIndex += _calledName.WriteWireFormat(dst, dstIndex); + dstIndex += _callingName.WriteWireFormat(dst, dstIndex); + return dstIndex - start; + } - /// - internal override int ReadTrailerWireFormat(InputStream @in, byte[] buffer, int bufferIndex) - { - int start = bufferIndex; - if (@in.Read(buffer, bufferIndex, Length) != Length) - { - throw new IOException("invalid session request wire format"); - } - bufferIndex += _calledName.ReadWireFormat(buffer, bufferIndex); - bufferIndex += _callingName.ReadWireFormat(buffer, bufferIndex); - return bufferIndex - start; - } - } + /// + internal override int ReadTrailerWireFormat(InputStream @in, byte[] buffer, int bufferIndex + ) + { + int start = bufferIndex; + if (@in.Read(buffer, bufferIndex, Length) != Length) + { + throw new IOException("invalid session request wire format"); + } + bufferIndex += _calledName.ReadWireFormat(buffer, bufferIndex); + bufferIndex += _callingName.ReadWireFormat(buffer, bufferIndex); + return bufferIndex - start; + } + } } -- cgit v1.2.3