diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-07-01 12:24:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-01 12:24:26 -0400 |
| commit | ff3713153ad2317e1c196f33ac2cba61b449a00e (patch) | |
| tree | 84d2e6ed5bcb556a2395603b6403c8e992535e6b /Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs | |
| parent | fad71a6c7d12c8b207cdf473c7dd7daafa53c174 (diff) | |
| parent | 2dcad6b5977f5c5be81b18c42506ed8ad3fb73b6 (diff) | |
Merge pull request #2739 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs')
| -rw-r--r-- | Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs b/Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs index a5243f7aa..0f4d7e5e2 100644 --- a/Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs +++ b/Emby.Common.Implementations/IO/SharpCifs/Netbios/SessionRequestPacket.cs @@ -19,45 +19,44 @@ 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; + } - /// <exception cref="System.IO.IOException"></exception> - 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; - } - } + /// <exception cref="System.IO.IOException"></exception> + 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; + } + } } |
