Skip to content

Commit

Permalink
Updated to work with 3.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
garrynewman committed Jun 3, 2020
1 parent 21de7a0 commit 05b3a31
Show file tree
Hide file tree
Showing 16 changed files with 805 additions and 1,025 deletions.
2 changes: 1 addition & 1 deletion Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public static class Constants
/// <summary>
/// What version of Director/Composer we're aiming at
/// </summary>
public const string TargetDirectorVersion = @"3.1.0";
public const string TargetDirectorVersion = @"3.1.3";
}
}
9 changes: 0 additions & 9 deletions Control4.Jailbreak.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="UI\Restore.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UI\Restore.Designer.cs">
<DependentUpon>Restore.cs</DependentUpon>
</Compile>
<Compile Include="UI\DirectorPatch.cs">
<SubType>UserControl</SubType>
</Compile>
Expand Down Expand Up @@ -147,9 +141,6 @@
<Compile Include="Utility\Sddp.cs" />
<Compile Include="Utility\Sddp.DeviceResponse.cs" />
<Compile Include="Utility\SoapClient.cs" />
<EmbeddedResource Include="UI\Restore.resx">
<DependentUpon>Restore.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\DirectorPatch.resx">
<DependentUpon>DirectorPatch.cs</DependentUpon>
</EmbeddedResource>
Expand Down
21 changes: 13 additions & 8 deletions DirectorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public DirectorManager( IPAddress address )
{
this.address = address;

SshConnectionInfo = new ConnectionInfo( address.ToString(), "root", new PasswordAuthenticationMethod( "root", "t0talc0ntr0l4!" ) );
SshConnectionInfo = new ConnectionInfo( address.ToString(), "jailbreak", new PasswordAuthenticationMethod( "jailbreak", "jailbreak" ) );
SshConnectionInfo.RetryAttempts = 1;
SshConnectionInfo.Timeout = TimeSpan.FromSeconds( 2 );
}
Expand All @@ -36,15 +36,20 @@ public DirectorManager( IPAddress address )

public async Task<bool> TryInitialize()
{
Soap = new SoapClient( address );

var getItems = await Soap.Call<Soap.GetItems>( "GetItems", "filter", "1" );
var getVersionInfo = await Soap.Call<Soap.GetVersionInfo>( "GetVersionInfo" );
var getCommonName = await Soap.Call<Soap.GetCommonName>( "GetCommonName" );
//
// Since 3.1.1 Soap doesn't work, we probably need a certificate or something
//

SystemName = getItems.SystemItems.All.Single( x => x.Type == 1 ).Name;
CommonName = getCommonName.CommonName;
Version = getVersionInfo.Versions.All.Single( x => x.Name == "Director" ).VersionNumber;
//Soap = new SoapClient( address );

//var getItems = await Soap.Call<Soap.GetItems>( "GetItems", "filter", "1" );
//var getVersionInfo = await Soap.Call<Soap.GetVersionInfo>( "GetVersionInfo" );
//var getCommonName = await Soap.Call<Soap.GetCommonName>( "GetCommonName" );

//SystemName = getItems.SystemItems.All.FirstOrDefault( x => x.Type == 1 ).Name;
//CommonName = getCommonName.CommonName;
//Version = getVersionInfo.Versions.All.Single( x => x.Name == "Director" ).VersionNumber;

Trace.WriteLine( $"Version is {Version}" );

Expand Down
248 changes: 110 additions & 138 deletions UI/Composer.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 05b3a31

Please sign in to comment.