mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-11 10:44:49 +00:00
SSH fixes and config changes
This commit is contained in:
@@ -133,7 +133,6 @@ namespace PepperDash.Core
|
||||
{
|
||||
Client.Disconnect();
|
||||
Client = null;
|
||||
//Client.Dispose();
|
||||
}
|
||||
Client = new SshClient(connectionInfo);
|
||||
|
||||
@@ -268,14 +267,6 @@ namespace PepperDash.Core
|
||||
}
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// Error event handler for stream events
|
||||
///// </summary>
|
||||
//void Stream_ErrorOccurred(object sender, ExceptionEventArgs e)
|
||||
//{
|
||||
// Debug.Console(2, this, "CRITICAL: PLEASE REPORT - SSH client stream error:\r{0}", e.Exception);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Error event handler for client events - disconnect, etc. Will forward those events via ConnectionChange
|
||||
/// event
|
||||
|
||||
@@ -163,13 +163,17 @@ namespace PepperDash.Core
|
||||
}
|
||||
}
|
||||
|
||||
public class TcpIpConfig
|
||||
|
||||
public class TcpSshPropertiesConfig
|
||||
{
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
public string Address { get; set; }
|
||||
|
||||
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
public int Port { get; set; }
|
||||
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Defaults to 32768
|
||||
@@ -186,12 +190,44 @@ namespace PepperDash.Core
|
||||
/// </summary>
|
||||
public int AutoReconnectIntervalMs { get; set; }
|
||||
|
||||
public TcpIpConfig()
|
||||
public TcpSshPropertiesConfig()
|
||||
{
|
||||
BufferSize = 32768;
|
||||
AutoReconnect = true;
|
||||
AutoReconnectIntervalMs = 5000;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//public class TcpIpConfig
|
||||
//{
|
||||
// [JsonProperty(Required = Required.Always)]
|
||||
// public string Address { get; set; }
|
||||
|
||||
// [JsonProperty(Required = Required.Always)]
|
||||
// public int Port { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Defaults to 32768
|
||||
// /// </summary>
|
||||
// public int BufferSize { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Defaults to true
|
||||
// /// </summary>
|
||||
// public bool AutoReconnect { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Defaults to 5000ms
|
||||
// /// </summary>
|
||||
// public int AutoReconnectIntervalMs { get; set; }
|
||||
|
||||
// public TcpIpConfig()
|
||||
// {
|
||||
// BufferSize = 32768;
|
||||
// AutoReconnect = true;
|
||||
// AutoReconnectIntervalMs = 5000;
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using Crestron.SimplSharp;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
//using Newtonsoft.Json;
|
||||
|
||||
namespace PepperDash.Core
|
||||
{
|
||||
public class SshConfig : TcpIpConfig
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
//namespace PepperDash.Core
|
||||
//{
|
||||
// public class SshConfig : TcpIpConfig
|
||||
// {
|
||||
// public string Username { get; set; }
|
||||
// public string Password { get; set; }
|
||||
// }
|
||||
//}
|
||||
@@ -82,7 +82,7 @@
|
||||
<Programmer />
|
||||
<ArchiveFilename>C:\Users\hvolm\Desktop\working\pepperdash-simplsharp-core\Pepperdash Core\Pepperdash Core\bin\PepperDash_Core.clz</ArchiveFilename>
|
||||
<MinFirmwareVersion>1.007.0017</MinFirmwareVersion>
|
||||
<CompiledOn>8/4/2016 12:58:52 PM</CompiledOn>
|
||||
<CompiledOn>8/4/2016 2:17:06 PM</CompiledOn>
|
||||
<AdditionalInfo />
|
||||
<EmbedSourceArchive>False</EmbedSourceArchive>
|
||||
<CopyTo />
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@
|
||||
<ArchiveName />
|
||||
</RequiredInfo>
|
||||
<OptionalInfo>
|
||||
<CompiledOn>8/4/2016 12:58:52 PM</CompiledOn>
|
||||
<CompilerRev>1.0.0.21565</CompilerRev>
|
||||
<CompiledOn>8/4/2016 2:17:06 PM</CompiledOn>
|
||||
<CompilerRev>1.0.0.23912</CompilerRev>
|
||||
</OptionalInfo>
|
||||
</ProgramInfo>
|
||||
@@ -1,4 +1,4 @@
|
||||
MainAssembly=PepperDash_Core.dll:1e2af81f50d343b460b7e2684b9db8fe
|
||||
MainAssembly=PepperDash_Core.dll:66c29b6308b378a0722f4f8fae4d948c
|
||||
MainAssemblyMinFirmwareVersion=1.007.0017
|
||||
ü
|
||||
DependencySource=Newtonsoft.Json.Compact.dll:ea996aa2ec65aa1878e7c9d09e37a896
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user