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