From 80d7e34bf19ef85ad76df0f684d91cbd3bfb52b1 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Tue, 28 Apr 2020 18:16:45 -0400 Subject: [PATCH] Fixes for updated sbe codegen --- src/lib/orderman/actors/ilink3/ILinkGW.cpp | 7 ++++--- src/lib/orderman/actors/ilink3/generated/Establish503.h | 2 +- src/lib/orderman/actors/ilink3/generated/Negotiate500.h | 2 +- .../actors/ilink3/generated/NegotiationResponse501.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/orderman/actors/ilink3/ILinkGW.cpp b/src/lib/orderman/actors/ilink3/ILinkGW.cpp index 644211083..bfdc07a9c 100644 --- a/src/lib/orderman/actors/ilink3/ILinkGW.cpp +++ b/src/lib/orderman/actors/ilink3/ILinkGW.cpp @@ -53,13 +53,14 @@ void ILinkGW::connect() { // This determines the session uuid void ILinkGW::send_negotiate() { // add 2 bytes for the empty 'credentials' (39008) length which must be present - auto msg = _buffer.frame(2); + auto msg = _buffer.frame( + iLinkBinary::Negotiate500::credentialsHeaderLength()); msg.uUID(_session.uuid); msg.requestTimestamp(_time.now()); msg.putSession(_config.cme_session); // We need this call to set the length of the credential block to 0 // This behavior is specific to "data" in the xml template - msg.putCredentials(""); + msg.putCredentials("", 0); msg.putFirm(_config.firm); const auto ld = glbx::calculate_hmac( @@ -80,7 +81,7 @@ void ILinkGW::send_establish() { msg.uUID(_session.uuid); msg.requestTimestamp(_time.now()); msg.putSession(_config.cme_session); - msg.putCredentials(""); + msg.putCredentials("", 0); msg.putFirm(_config.firm); msg.putTradingSystemName(std::string_view("SPARK")); diff --git a/src/lib/orderman/actors/ilink3/generated/Establish503.h b/src/lib/orderman/actors/ilink3/generated/Establish503.h index 3910b4331..5071f79ed 100644 --- a/src/lib/orderman/actors/ilink3/generated/Establish503.h +++ b/src/lib/orderman/actors/ilink3/generated/Establish503.h @@ -2475,7 +2475,7 @@ SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t Credentia size_t length = sbeBlockLength(); - length += CredentialsHeaderLength(); + length += credentialsHeaderLength(); if (CredentialsLength > 65534) { throw std::runtime_error("CredentialsLength too long for length type [E109]"); diff --git a/src/lib/orderman/actors/ilink3/generated/Negotiate500.h b/src/lib/orderman/actors/ilink3/generated/Negotiate500.h index 34f40aa61..6414c672a 100644 --- a/src/lib/orderman/actors/ilink3/generated/Negotiate500.h +++ b/src/lib/orderman/actors/ilink3/generated/Negotiate500.h @@ -1817,7 +1817,7 @@ SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t Credentia size_t length = sbeBlockLength(); - length += CredentialsHeaderLength(); + length += credentialsHeaderLength(); if (CredentialsLength > 65534) { throw std::runtime_error("CredentialsLength too long for length type [E109]"); diff --git a/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h b/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h index 2b5f5d9a7..e3cd03bf4 100644 --- a/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h +++ b/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h @@ -1178,7 +1178,7 @@ SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength(std::size_t Credentia size_t length = sbeBlockLength(); - length += CredentialsHeaderLength(); + length += credentialsHeaderLength(); if (CredentialsLength > 65534) { throw std::runtime_error("CredentialsLength too long for length type [E109]");