Fixes for updated sbe codegen

This commit is contained in:
Eric Harding committed 2020-04-28 18:16:45 -04:00
1 parent 8ab69c919b
commit 80d7e34bf1
4 files changed
+7 -6

No files matched your search

+4 -3
View File
@@ -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<iLinkBinary::Negotiate500>(2);
auto msg = _buffer.frame<iLinkBinary::Negotiate500>(
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"));
@@ -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]");
@@ -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]");
@@ -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]");