From bcdc08939061e14b7cc249813b91e682d4042836 Mon Sep 17 00:00:00 2001 From: lotodore Date: Sat, 4 Sep 2010 12:36:39 +0000 Subject: [PATCH] Fixing double name in protocol. --- docs/pokerth.asn1 | 2 +- src/net/common/clientstate.cpp | 4 ++-- src/third_party/asn1/EncryptedCards.c | 10 +++++----- src/third_party/asn1/EncryptedCards.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/pokerth.asn1 b/docs/pokerth.asn1 index 7b342aa6..f656266c 100644 --- a/docs/pokerth.asn1 +++ b/docs/pokerth.asn1 @@ -437,7 +437,7 @@ PlainCards ::= SEQUENCE { } EncryptedCards ::= SEQUENCE { - encryptedCards OCTET STRING (SIZE(16..64)) + cardData OCTET STRING (SIZE(16..64)) } HandStartMessage ::= [APPLICATION 23] SEQUENCE { diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp index 5c2fccb9..99a9d03f 100644 --- a/src/net/common/clientstate.cpp +++ b/src/net/common/clientstate.cpp @@ -1699,8 +1699,8 @@ ClientStateWaitHand::InternalHandlePacket(boost::shared_ptr client string plainCards; if (!CryptHelper::AES128Decrypt((const unsigned char *)userPassword.c_str(), (unsigned)userPassword.size(), - encryptedCards->encryptedCards.buf, - encryptedCards->encryptedCards.size, + encryptedCards->cardData.buf, + encryptedCards->cardData.size, plainCards)) { throw ClientException(__FILE__, __LINE__, ERR_NET_UNKNOWN_PLAYER_ID, 0); diff --git a/src/third_party/asn1/EncryptedCards.c b/src/third_party/asn1/EncryptedCards.c index c9663d89..05fce0dc 100644 --- a/src/third_party/asn1/EncryptedCards.c +++ b/src/third_party/asn1/EncryptedCards.c @@ -10,7 +10,7 @@ #include "EncryptedCards.h" static int -memb_encryptedCards_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, +memb_cardData_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; @@ -36,21 +36,21 @@ memb_encryptedCards_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, } static asn_TYPE_member_t asn_MBR_EncryptedCards_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct EncryptedCards, encryptedCards), + { ATF_NOFLAGS, 0, offsetof(struct EncryptedCards, cardData), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, - memb_encryptedCards_constraint_1, + memb_cardData_constraint_1, 0, /* PER is not compiled, use -gen-PER */ 0, - "encryptedCards" + "cardData" }, }; static ber_tlv_tag_t asn_DEF_EncryptedCards_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_EncryptedCards_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* encryptedCards at 440 */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* cardData at 440 */ }; static asn_SEQUENCE_specifics_t asn_SPC_EncryptedCards_specs_1 = { sizeof(struct EncryptedCards), diff --git a/src/third_party/asn1/EncryptedCards.h b/src/third_party/asn1/EncryptedCards.h index 5c3ea1cf..0e8c9d46 100644 --- a/src/third_party/asn1/EncryptedCards.h +++ b/src/third_party/asn1/EncryptedCards.h @@ -21,7 +21,7 @@ extern "C" { /* EncryptedCards */ typedef struct EncryptedCards { - OCTET_STRING_t encryptedCards; + OCTET_STRING_t cardData; /* * This type is extensible, * possible extensions are below.