mirror of https://github.com/icedream/npsharp.git
Fixing typos and AuthenticateWithToken handler.
parent
f2e648f18b
commit
e508906e2b
|
@ -108,7 +108,10 @@ namespace NPSharp
|
|||
|
||||
_rpc.AttachCallback(packet =>
|
||||
{
|
||||
var result = (AuthenticateResultMessage) packet;
|
||||
var result = packet as AuthenticateResultMessage;
|
||||
if (result == null)
|
||||
return;
|
||||
|
||||
if (result.Result != 0)
|
||||
tcs.SetResult(false);
|
||||
LoginId = result.NPID;
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace NPSharp.RPC.Messages
|
|||
public byte[] Serialize(uint id)
|
||||
{
|
||||
#if DEBUG
|
||||
Log.DebugFormat("Packet[ID={0},Type={1},TypeName={2}] {{", id, GetTypeId(), GetType().Name);
|
||||
Log.DebugFormat("RPCClientMessage[ID={0},Type={1},TypeName={2}] {{", id, GetTypeId(), GetType().Name);
|
||||
foreach (var prop in GetType().GetProperties())
|
||||
{
|
||||
Log.DebugFormat("\t{0} = {1}", prop.Name, prop.GetValue(this));
|
||||
|
|
|
@ -91,8 +91,8 @@ namespace NPSharp.RPC.Messages
|
|||
packet.MessageId = pid;
|
||||
|
||||
#if DEBUG
|
||||
Log.DebugFormat("ServerMessage[ID={0},Type={1},TypeName={2}] {{", pid, packet.GetTypeId(), packet.GetType().Name);
|
||||
foreach (var prop in packet.GetType().GetProperties())
|
||||
Log.DebugFormat("RPCServerMessage[ID={0},Type={1},TypeName={2}] {{", pid, packet.GetTypeId(), packet.GetType().Name);
|
||||
foreach (var prop in packet.GetType().GetProperties().Where(p => !(p.DeclaringType is RPCServerMessage)))
|
||||
{
|
||||
Log.DebugFormat("\t{0} = {1}", prop.Name, prop.GetValue(packet));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue