diff --git a/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs b/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs index 92c1bcb..0a89365 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs @@ -126,10 +126,10 @@ namespace PepperDash.Core CTimer ReconnectTimer; - string PreviousHostname; - int PreviousPort; - string PreviousUsername; - string PreviousPassword; + //string PreviousHostname; + //int PreviousPort; + //string PreviousUsername; + //string PreviousPassword; /// /// Typical constructor. @@ -213,37 +213,37 @@ namespace PepperDash.Core PasswordAuthenticationMethod pauth = new PasswordAuthenticationMethod(Username, Password); // Make a new client if we need it or things have changed - if (Client == null || PropertiesHaveChanged()) - { + //if (Client == null || PropertiesHaveChanged()) + //{ if (Client != null) { Debug.Console(2, this, "Cleaning up disconnected client"); Client.ErrorOccurred -= Client_ErrorOccurred; - if (TheStream != null) - { - TheStream.DataReceived -= Stream_DataReceived; - TheStream.ErrorOccurred -= TheStream_ErrorOccurred; - } - TheStream = null; + KillStream(); + + //if (TheStream != null) + //{ + // TheStream.DataReceived -= Stream_DataReceived; + // TheStream.ErrorOccurred -= TheStream_ErrorOccurred; + //} + //TheStream = null; } Debug.Console(2, this, "Creating new SshClient"); ConnectionInfo connectionInfo = new ConnectionInfo(Hostname, Port, Username, pauth, kauth); Client = new SshClient(connectionInfo); Client.ErrorOccurred += Client_ErrorOccurred; - } - PreviousHostname = Hostname; - PreviousPassword = Password; - PreviousPort = Port; - PreviousUsername = Username; + //} + //PreviousHostname = Hostname; + //PreviousPassword = Password; + //PreviousPort = Port; + //PreviousUsername = Username; //You can do it! ClientStatus = SocketStatus.SOCKET_STATUS_WAITING; try { Client.Connect(); -#warning We are getting past here with a false IsConnected when it appears to be connected - // Have to assume client is connected cause Client.IsConnected is busted in some cases // All other conditions *should* error out... @@ -256,10 +256,10 @@ namespace PepperDash.Core TheStream.ErrorOccurred += TheStream_ErrorOccurred; Debug.Console(1, this, "Connected"); ClientStatus = SocketStatus.SOCKET_STATUS_CONNECTED; - PreviousHostname = Hostname; - PreviousPassword = Password; - PreviousPort = Port; - PreviousUsername = Username; + //PreviousHostname = Hostname; + //PreviousPassword = Password; + //PreviousPort = Port; + //PreviousUsername = Username; //} return; // Success will not pass here } @@ -305,6 +305,7 @@ namespace PepperDash.Core } KillStream(); Client.Disconnect(); + Client = null; ClientStatus = SocketStatus.SOCKET_STATUS_BROKEN_LOCALLY; Debug.Console(1, this, "Disconnected"); } @@ -352,11 +353,11 @@ namespace PepperDash.Core } } - bool PropertiesHaveChanged() - { - return Hostname != PreviousHostname || Port != PreviousPort - || Username != PreviousUsername || Password != PreviousPassword; - } + //bool PropertiesHaveChanged() + //{ + // return Hostname != PreviousHostname || Port != PreviousPort + // || Username != PreviousUsername || Password != PreviousPassword; + //} /// /// Handles the keyboard interactive authentication, should it be required. diff --git a/Pepperdash Core/Pepperdash Core/PepperDash_Core.projectinfo b/Pepperdash Core/Pepperdash Core/PepperDash_Core.projectinfo index e9d6283..643294b 100644 Binary files a/Pepperdash Core/Pepperdash Core/PepperDash_Core.projectinfo and b/Pepperdash Core/Pepperdash Core/PepperDash_Core.projectinfo differ diff --git a/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.clz b/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.clz index 4b94e68..573c965 100644 Binary files a/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.clz and b/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.clz differ diff --git a/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.config b/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.config index c53c1a3..6c111fc 100644 --- a/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.config +++ b/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.config @@ -10,8 +10,8 @@ - 12/6/2016 2:53:00 PM - 1.0.0.26789 + 12/6/2016 3:50:54 PM + 1.0.0.28526 Crestron.SIMPLSharp, Version=2.0.48.0, Culture=neutral, PublicKeyToken=812d080f93e2de10 diff --git a/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.dll b/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.dll index fe0f426..5d99e4e 100644 Binary files a/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.dll and b/Pepperdash Core/Pepperdash Core/bin/PepperDash_Core.dll differ diff --git a/Pepperdash Core/Pepperdash Core/bin/manifest.info b/Pepperdash Core/Pepperdash Core/bin/manifest.info index 745e267..13ba16b 100644 --- a/Pepperdash Core/Pepperdash Core/bin/manifest.info +++ b/Pepperdash Core/Pepperdash Core/bin/manifest.info @@ -1,4 +1,4 @@ -MainAssembly=PepperDash_Core.dll:3a5fe881bafa819e1046cf092f48b180 +MainAssembly=PepperDash_Core.dll:2fe05eb2518594f4d27bd9ae43dc7a02 MainAssemblyMinFirmwareVersion=1.007.0017 MainAssemblyResource=SimplSharpData.dat:315526abf906cded47fb0c7510266a7e ü diff --git a/Pepperdash Core/Pepperdash Core/bin/manifest.ser b/Pepperdash Core/Pepperdash Core/bin/manifest.ser index 0007751..78366e5 100644 Binary files a/Pepperdash Core/Pepperdash Core/bin/manifest.ser and b/Pepperdash Core/Pepperdash Core/bin/manifest.ser differ