mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 05:23:13 +00:00
fix
This commit is contained in:
@ -869,6 +869,15 @@ namespace Esiur.Net.IIP
|
||||
//Global.Log("auth", LogType.Warning, "U:" + RemoteUsername + " IP:" + Socket.RemoteEndPoint.Address.ToString() + " S:AUTH");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
SendParams()
|
||||
.AddUInt8(0xc0)
|
||||
.AddUInt8((byte)ExceptionCode.GeneralFailure)
|
||||
.AddUInt16(9)
|
||||
.AddString("Not ready")
|
||||
.Done();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -876,15 +885,16 @@ namespace Esiur.Net.IIP
|
||||
{
|
||||
if (authPacket.Command == IIPAuthPacket.IIPAuthPacketCommand.Acknowledge)
|
||||
{
|
||||
if (authPacket.LocalMethod == AuthenticationMethod.None)
|
||||
if (authPacket.RemoteMethod == AuthenticationMethod.None)
|
||||
{
|
||||
// send establish
|
||||
SendParams()
|
||||
.AddUInt8(0x20)
|
||||
.AddUInt16(0)
|
||||
.Done();
|
||||
}
|
||||
else if (authPacket.LocalMethod == AuthenticationMethod.Credentials
|
||||
|| authPacket.LocalMethod == AuthenticationMethod.Token)
|
||||
else if (authPacket.RemoteMethod == AuthenticationMethod.Credentials
|
||||
|| authPacket.RemoteMethod == AuthenticationMethod.Token)
|
||||
{
|
||||
remoteNonce = authPacket.RemoteNonce;
|
||||
|
||||
|
@ -1098,7 +1098,7 @@ namespace Esiur.Net.IIP
|
||||
|
||||
var templates = new List<ResourceTemplate>();
|
||||
foreach (var resource in list)
|
||||
templates.AddRange(ResourceTemplate.GetRuntimeTypes(resource.Instance.Template).Where(x => !templates.Contains(x)));
|
||||
templates.AddRange(ResourceTemplate.GetDependencies(resource.Instance.Template).Where(x => !templates.Contains(x)));
|
||||
|
||||
foreach(var t in templates)
|
||||
{
|
||||
@ -2210,8 +2210,8 @@ namespace Esiur.Net.IIP
|
||||
if (resource == null)
|
||||
{
|
||||
var template = Warehouse.GetTemplate((Guid)rt[0]);
|
||||
if (template?.RuntimeType != null)
|
||||
dr = Activator.CreateInstance(template.RuntimeType, this, id, (ulong)rt[1], (string)rt[2]) as DistributedResource;
|
||||
if (template?.ResourceType != null)
|
||||
dr = Activator.CreateInstance(template.ResourceType, this, id, (ulong)rt[1], (string)rt[2]) as DistributedResource;
|
||||
else
|
||||
dr = new DistributedResource(this, id, (ulong)rt[1], (string)rt[2]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user