From c1b1ae2fe0429ac5b7ad4dd45a1623ffb7162456 Mon Sep 17 00:00:00 2001 From: lotodore Date: Wed, 9 Feb 2011 22:23:45 +0000 Subject: [PATCH] Updating Guid stuff. --- src/net/common/serverlobbythread.cpp | 1 - tests/src/pokerth_protocol/Guid.java | 33 +++++++++++++++------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 66f68cae..9c0332a1 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -1671,7 +1671,6 @@ ServerLobbyThread::EstablishSession(SessionWrapper session) &netInitAck->yourSessionId, (char *)&sessionId, boost::uuids::uuid::static_size()); -// initAckData.sessionId = session.sessionData->GetId(); // TODO: currently unused. netInitAck->yourPlayerId = session.playerData->GetUniqueId(); GetSender().Send(session.sessionData, ack); diff --git a/tests/src/pokerth_protocol/Guid.java b/tests/src/pokerth_protocol/Guid.java index 8dd7ffc2..f16e499b 100644 --- a/tests/src/pokerth_protocol/Guid.java +++ b/tests/src/pokerth_protocol/Guid.java @@ -19,29 +19,32 @@ import org.bn.types.*; @ASN1BoxedType ( name = "Guid" ) public class Guid implements IASN1PreparedElement { - @ASN1Integer( name = "Guid" ) - @ASN1ValueRangeConstraint ( - - min = 0L, - - max = 4294967295L - - ) - - private Long value; + @ASN1OctetString( name = "Guid" ) + + @ASN1SizeConstraint ( max = 16L ) + + private byte[] value = null; public Guid() { } - public Guid(Long value) { + public Guid(byte[] value) { this.value = value; } - - public void setValue(Long value) { - this.value = value; + + public Guid(BitString value) { + setValue(value); } - public Long getValue() { + public void setValue(byte[] value) { + this.value = value; + } + + public void setValue(BitString btStr) { + this.value = btStr.getValue(); + } + + public byte[] getValue() { return this.value; }